10000 chore: get and use commit of branch we are trying to build (#1614) · paliwangtel/postgres@61c75e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 61c75e3

Browse files
authored
chore: get and use commit of branch we are trying to build (supabase#1614)
1 parent c1b31ca commit 61c75e3

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/ami-release-nix-single.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
with:
2929
ref: ${{ github.event.inputs.branch }}
3030

31+
- name: Get current branch SHA
32+
id: get_sha
33+
run: |
34+
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
35+
3136
- uses: DeterminateSystems/nix-installer-action@main
3237

3338
- name: Set PostgreSQL version environment variable
@@ -46,15 +51,15 @@ jobs:
4651
POSTGRES_MAJOR_VERSION: ${{ env.POSTGRES_MAJOR_VERSION }}
4752
run: |
4853
packer init amazon-arm64-nix.pkr.hcl
49-
GIT_SHA=${{github.sha}}
54+
GIT_SHA=${{ steps.get_sha.outputs.sha }}
5055
packer build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "ansible_arguments=-e postgresql_major=${POSTGRES_MAJOR_VERSION}" amazon-arm64-nix.pkr.hcl
5156
5257
- name: Build AMI stage 2
5358
env:
5459
POSTGRES_MAJOR_VERSION: ${{ env.POSTGRES_MAJOR_VERSION }}
5560
run: |
5661
packer init stage2-nix-psql.pkr.hcl
57-
GIT_SHA=${{github.sha}}
62+
GIT_SHA=${{ steps.get_sha.outputs.sha }}
5863
POSTGRES_MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }}
5964
packer build -var "git_sha=${GIT_SHA}" -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var "postgres_major_version=${POSTGRES_MAJOR_VERSION}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" stage2-nix-psql.pkr.hcl
6065
@@ -66,7 +71,7 @@ jobs:
6671
6772
- name: Create nix flake revision tarball
6873
run: |
69-
GIT_SHA=${{github.sha}}
74+
GIT_SHA=${{ steps.get_sha.outputs.sha }}
7075
MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }}
7176
7277
mkdir -p "/tmp/pg_upgrade_bin/${MAJOR_VERSION}"
@@ -116,7 +121,7 @@ jobs:
116121
with:
117122
name: ${{ steps.process_release_version.outputs.version }}
118123
tag_name: ${{ steps.process_release_version.outputs.version }}
119-
target_commitish: ${{github.sha}}
124+
target_commitish: ${{ steps.get_sha.outputs.sha }}
120125

121126
- name: Slack Notification on Failure
122127
if: ${{ failure() }}

0 commit comments

Comments
 (0)
0