diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 8997303..5eb59c2 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -6,7 +6,7 @@ on: platforms: description: 'The platforms for which the Docker image should be built. If not specified, defaults to linux/amd64.' required: false - default: 'linux/amd64' + default: 'linux/amd64,linux/arm64/v8' jobs: build-push: uses: kbase/.github/.github/workflows/reusable_build-push.yml@multi-target diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index d3ecfbd..5d07745 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -15,11 +15,19 @@ on: env: PLATFORMS: 'linux/amd64,linux/arm64/v8' jobs: + set-platforms: + runs-on: ubuntu-latest + outputs: + platforms: ${{ steps.set-platforms.outputs.platforms }} + steps: + - name: Set platforms + id: set-platforms + run: echo "::set-output name=platforms::linux/amd64,linux/arm64/v8" build-develop-open: if: github.base_ref == 'develop' && github.event.pull_request.merged == false uses: kbase/.github/.github/workflows/reusable_build.yml@multi-target with: - platforms: ${{ env.PLATFORMS }} + platforms: ${{ needs.set-platforms.outputs.platforms }} secrets: inherit build-develop-merge: if: github.base_ref == 'develop' && github.event.pull_request.merged == true @@ -27,7 +35,7 @@ jobs: with: name: '${{ github.event.repository.name }}-develop' tags: pr-${{ github.event.number }},latest - platforms: ${{ env.PLATFORMS }} + platforms: ${{ needs.set-platforms.outputs.platforms }} secrets: inherit build-main-open: if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == false @@ -35,7 +43,7 @@ jobs: with: name: '${{ github.event.repository.name }}' tags: pr-${{ github.event.number }} - platforms: ${{ env.PLATFORMS }} + platforms: ${{ needs.set-platforms.outputs.platforms }} secrets: inherit build-main-merge: if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == true @@ -43,7 +51,7 @@ jobs: with: name: '${{ github.event.repository.name }}' tags: pr-${{ github.event.number }},latest-rc - platforms: ${{ env.PLATFORMS }} + platforms: ${{ needs.set-platforms.outputs.platforms }} secrets: inherit trivy-scans: if: (github.base_ref == 'develop' || github.base_ref == 'main' || github.base_ref == 'master' ) && github.event.pull_request.merged == false diff --git a/.github/workflows/release-main.yml b/.github/workflows/release-main.yml index 04a3701..52f4517 100644 --- a/.github/workflows/release-main.yml +++ b/.github/workflows/release-main.yml @@ -6,10 +6,15 @@ on: - main - master types: [ published ] -# Defaults to building for linux/amd64. Can modify be updating variable, e.g. PLATFORMS: 'linux/amd64,linux/arm64/v8' -env: - PLATFORMS: 'linux/amd64,linux/arm64/v8' jobs: + set-platforms: + runs-on: ubuntu-latest + outputs: + platforms: ${{ steps.set-platforms.outputs.platforms }} + steps: + - name: Set platforms + id: set-platforms + run: echo "::set-output name=platforms::linux/amd64,linux/arm64/v8" check-source-branch: uses: kbase/.github/.github/workflows/reusable_validate-branch.yml@multi-target with: @@ -25,5 +30,5 @@ jobs: with: name: '${{ github.event.repository.name }}' tags: '${{ github.event.release.tag_name }},latest' - platforms: ${{ env.PLATFORMS }} + platforms: ${{ needs.set-platforms.outputs.platforms }} secrets: inherit