Skip to content

Commit 215f022

Browse files
committed
refactor: extract platform_pair to inputs
Signed-off-by: Yukai Huang <[email protected]>
1 parent c2512cf commit 215f022

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/actions/build-steps/action.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
platform:
77
required: true
88
type: string
9+
platform_pair:
10+
required: true
11+
type: string
912
registry_image:
1013
required: true
1114
type: string
@@ -23,11 +26,6 @@ jobs:
2326
build:
2427
runs-on: ${{ inputs.runs_on }}
2528
steps:
26-
-
27-
name: Prepare Platform Environment
28-
run: |
29-
platform=${{ inputs.platform }}
30-
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
3129
-
3230
name: Checkout
3331
uses: actions/checkout@v4
@@ -72,7 +70,7 @@ jobs:
7270
name: Upload digest
7371
uses: actions/upload-artifact@v4
7472
with:
75-
name: digests-${{ env.PLATFORM_PAIR }}
73+
name: digests-${{ inputs.platform_pair }}
7674
path: /tmp/digests/*
7775
if-no-files-found: error
7876
retention-days: 1

.github/workflows/push-image.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
secrets: inherit
2424
with:
2525
platform: linux/amd64
26+
platform_pair: linux_amd64
2627
registry_image: ${{ env.REGISTRY_IMAGE }}
2728
runtime: ${{ github.event.inputs.runtime }}
2829
buildpack: ${{ github.event.inputs.buildpack }}
@@ -33,6 +34,7 @@ jobs:
3334
secrets: inherit
3435
with:
3536
platform: linux/arm64
37+
platform_pair: linux_arm64
3638
registry_image: ${{ env.REGISTRY_IMAGE }}
3739
runtime: ${{ github.event.inputs.runtime }}
3840
buildpack: ${{ github.event.inputs.buildpack }}

0 commit comments

Comments
 (0)