From eaed2ee77c57e6c79ad79609dc9b6d0c8854cca9 Mon Sep 17 00:00:00 2001 From: Subhi Al Hasan Date: Sat, 13 May 2023 02:33:35 +0200 Subject: [PATCH] fix: add platforms to build-images-worfklow --- .github/workflows/build-images-workflow.yaml | 9 ++++++--- .github/workflows/release.yaml | 8 +++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-images-workflow.yaml b/.github/workflows/build-images-workflow.yaml index fd9d6225..42b11729 100644 --- a/.github/workflows/build-images-workflow.yaml +++ b/.github/workflows/build-images-workflow.yaml @@ -1,6 +1,5 @@ name: Build Docker Images env: - TARGET_PLATFORMS: linux/amd64,linux/arm64 REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} @@ -19,7 +18,11 @@ on: set_new_images_as_latest: required: true type: boolean - + platforms: + description: 'Docker image platforms' + required: true + default: 'linux/amd64, linux/arm64' + type: string permissions: @@ -77,7 +80,7 @@ jobs: with: context: . file: images/${{ matrix.image }}/Dockerfile - platforms: ${{ env.TARGET_PLATFORMS }} + platforms: ${{ inputs.platforms }} push: ${{ inputs.push }} tags: ${{ steps.image-meta.outputs.tags }} labels: ${{ steps.image-meta.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1c7e7c2c..43f2f6b6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,12 +27,13 @@ jobs: build-images: needs: [generate-next-semantic-version] - uses: "./.github/workflows/build-images-workflow.yaml" + uses: ./.github/workflows/build-images-workflow.yaml with: - set_new_images_as_latest: false + set_new_images_as_latest: true push: true new_images_tag: ${{needs.generate-next-semantic-version.outputs.version}} - ref: main + ref: ${{ github.sha }} + platforms: "linux/amd64, linux/arm64" release: needs: [build-images] @@ -42,6 +43,7 @@ jobs: name: Checkout repository with: submodules: true + ref: ${{ github.sha }} - name: semantic-release env: