Skip to content

Commit 611572c

Browse files
committed
chore: cannot lose arch handling
1 parent b891382 commit 611572c

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/manual-docker-release.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
outputs:
1414
build_args: ${{ steps.args.outputs.result }}
15+
dockerfile: ${{ steps.dockerfile.outputs.path }}
1516
steps:
1617
- uses: actions/checkout@v3
1718
- uses: DeterminateSystems/nix-installer-action@main
@@ -25,7 +26,25 @@ jobs:
2526
| each { |it| $"($it.name)=($it.item)" }
2627
| str join "\n"
2728
| save --append $env.GITHUB_OUTPUT
28-
'
29+
'
30+
31+
- id: dockerfile
32+
run: |
33+
# Determine the Dockerfile name
34+
if [[ "${{ inputs.postgresVersion }}" == *"orioledb"* ]]; then
35+
DOCKERFILE="Dockerfile-17"
36+
else
37+
MAJOR_VERSION=$(echo "${{ inputs.postgresVersion }}" | cut -d. -f1)
38+
DOCKERFILE="Dockerfile-${MAJOR_VERSION}"
39+
fi
40+
41+
# Verify the Dockerfile exists
42+
if [ ! -f "$DOCKERFILE" ]; then
43+
echo "Error: $DOCKERFILE does not exist"
44+
exit 1
45+
fi
46+
47+
echo "path=$DOCKERFILE" >> $GITHUB_OUTPUT
2948
3049
build_release_image:
3150
needs: build
@@ -61,7 +80,7 @@ jobs:
6180
platforms: linux/${{ matrix.arch }}
6281
cache-from: type=gha,scope=${{ github.ref_name }}-latest-${{ matrix.arch }}
6382
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-latest-${{ matrix.arch }}
64-
file: Dockerfile-${{ matrix.arch }}
83+
file: ${{ needs.build.outputs.dockerfile }}
6584

6685
merge_manifest:
6786
needs: build_release_image

0 commit comments

Comments
 (0)