Compare commits

..

1 Commits

2 changed files with 5 additions and 9 deletions

View File

@ -12,7 +12,6 @@ on:
env: env:
WERF_STAGED_DOCKERFILE_VERSION: v2 WERF_STAGED_DOCKERFILE_VERSION: v2
WERF_BUILDAH_MODE: auto WERF_BUILDAH_MODE: auto
WERF_ENV: ${{ (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && 'release' || 'pr' }}
jobs: jobs:
build: build:
@ -31,7 +30,7 @@ jobs:
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
with: with:
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v8 platforms: linux/amd64, linux/arm64
- name: Login into ghcr.io - name: Login into ghcr.io
shell: bash shell: bash
@ -48,7 +47,7 @@ jobs:
source "$(werf ci-env github --as-file)" source "$(werf ci-env github --as-file)"
source <(jq -r '.labels | to_entries | to_entries[] | "export WERF_EXPORT_ADD_LABEL_\(.key)=\"\(.value.key)=\(.value.value)\""' <<< $DOCKER_METADATA_OUTPUT_JSON) source <(jq -r '.labels | to_entries | to_entries[] | "export WERF_EXPORT_ADD_LABEL_\(.key)=\"\(.value.key)=\(.value.value)\""' <<< $DOCKER_METADATA_OUTPUT_JSON)
werf build --repo='' --final-repo='' --secondary-repo "$WERF_REPO" --env "$WERF_ENV" werf build --repo='' --final-repo='' --secondary-repo "$WERF_REPO"
- name: Build and Push Image - name: Build and Push Image
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' }}
@ -56,4 +55,4 @@ jobs:
source "$(werf ci-env github --as-file)" source "$(werf ci-env github --as-file)"
source <(jq -r '.labels | to_entries | to_entries[] | "export WERF_EXPORT_ADD_LABEL_\(.key)=\"\(.value.key)=\(.value.value)\""' <<< $DOCKER_METADATA_OUTPUT_JSON) source <(jq -r '.labels | to_entries | to_entries[] | "export WERF_EXPORT_ADD_LABEL_\(.key)=\"\(.value.key)=\(.value.value)\""' <<< $DOCKER_METADATA_OUTPUT_JSON)
werf export --tag ghcr.io/${{ github.repository }}/%image%:${{ github.ref_name }} --env "$WERF_ENV" werf export --tag ghcr.io/${{ github.repository }}/%image%:${{ github.ref_name }}

View File

@ -3,11 +3,8 @@ configVersion: 1
build: build:
platform: platform:
- linux/amd64 - linux/amd64
{{- if eq .Env "release" }} # TODO(nabokihms): build multiplatform images only for the master branch
- linux/arm64 # - linux/arm64
- linux/arm/v7
- linux/arm/v8
{{- end }}
staged: true staged: true
--- ---
image: ovpn-admin image: ovpn-admin