Skip to content

Commit

Permalink
Updating workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
JS Fillman committed Apr 9, 2024
1 parent 2ddf0e5 commit 15b6138
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,43 @@ 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
uses: kbase/.github/.github/workflows/reusable_build-push.yml@multi-target
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
uses: kbase/.github/.github/workflows/reusable_build-push.yml@multi-target
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
uses: kbase/.github/.github/workflows/reusable_build-push.yml@multi-target
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
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit 15b6138

Please sign in to comment.