Skip to content

Commit

Permalink
refactor: extract platform_pair to inputs
Browse files Browse the repository at this point in the history
Signed-off-by: Yukai Huang <[email protected]>
  • Loading branch information
Yukaii committed Oct 30, 2024
1 parent c2512cf commit 215f022
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/actions/build-steps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
platform:
required: true
type: string
platform_pair:
required: true
type: string
registry_image:
required: true
type: string
Expand All @@ -23,11 +26,6 @@ jobs:
build:
runs-on: ${{ inputs.runs_on }}
steps:
-
name: Prepare Platform Environment
run: |
platform=${{ inputs.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
-
name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -72,7 +70,7 @@ jobs:
name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}
name: digests-${{ inputs.platform_pair }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
2 changes: 2 additions & 0 deletions .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
secrets: inherit
with:
platform: linux/amd64
platform_pair: linux_amd64
registry_image: ${{ env.REGISTRY_IMAGE }}
runtime: ${{ github.event.inputs.runtime }}
buildpack: ${{ github.event.inputs.buildpack }}
Expand All @@ -33,6 +34,7 @@ jobs:
secrets: inherit
with:
platform: linux/arm64
platform_pair: linux_arm64
registry_image: ${{ env.REGISTRY_IMAGE }}
runtime: ${{ github.event.inputs.runtime }}
buildpack: ${{ github.event.inputs.buildpack }}
Expand Down

0 comments on commit 215f022

Please sign in to comment.