File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 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
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
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
You can’t perform that action at this time.
0 commit comments