Skip to content

Commit 2f36aab

Browse files
committed
Revert "chore; REVERT this later"
This reverts commit f964393.
1 parent 23fbb98 commit 2f36aab

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/qemu-image-build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,27 @@ on:
1414
workflow_dispatch:
1515

1616
jobs:
17+
prepare:
18+
runs-on: ubuntu-latest
19+
outputs:
20+
postgres_versions: ${{ steps.set-versions.outputs.postgres_versions }}
21+
steps:
22+
- name: Checkout Repo
23+
uses: actions/checkout@v3
24+
25+
- uses: DeterminateSystems/nix-installer-action@main
26+
27+
- name: Set PostgreSQL versions - only builds pg15 atm
28+
id: set-versions
29+
run: |
30+
VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[0]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c 'split("\n")[:-1]')
31+
echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT
1732
1833
build:
34+
needs: prepare
35+
strategy:
36+
matrix:
37+
postgres_version: ${{ fromJson(needs.prepare.outputs.postgres_versions) }}
1938
runs-on: arm-native-runner
2039
timeout-minutes: 150
2140
permissions:
@@ -27,8 +46,23 @@ jobs:
2746
- name: Checkout Repo
2847
uses: actions/checkout@v3
2948

49+
- name: Get binaries
50+
run: |
51+
hash
52+
echo $PATH
53+
3054
- uses: DeterminateSystems/nix-installer-action@main
3155

56+
# TODO (darora): might need to temporarily disable this
57+
- name: Run checks if triggered manually
58+
if: ${{ github.event_name == 'workflow_dispatch' }}
59+
run: |
60+
SUFFIX=$(sudo nix run nixpkgs#yq -- ".postgres_release[\"postgres${{ matrix.postgres_version }}\"]" ansible/vars.yml | sed -E 's/[0-9\.]+(.*)$/\1/')
61+
if [[ -z $SUFFIX ]] ; then
62+
echo "Version must include non-numeric characters if built manually."
63+
exit 1
64+
fi
65+
3266
- name: enable KVM support
3367
run: |
3468
sudo ls /dev/kvm

0 commit comments

Comments
 (0)