28
28
with :
29
29
ref : ${{ github.event.inputs.branch }}
30
30
31
+ - name : Get current branch SHA
32
+ id : get_sha
33
+ run : |
34
+ echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
35
+
31
36
- uses : DeterminateSystems/nix-installer-action@main
32
37
33
38
- name : Set PostgreSQL version environment variable
@@ -46,15 +51,15 @@ jobs:
46
51
POSTGRES_MAJOR_VERSION : ${{ env.POSTGRES_MAJOR_VERSION }}
47
52
run : |
48
53
packer init amazon-arm64-nix.pkr.hcl
49
- GIT_SHA=${{github. sha}}
54
+ GIT_SHA=${{ steps.get_sha.outputs. sha }}
50
55
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
51
56
52
57
- name : Build AMI stage 2
53
58
env :
54
59
POSTGRES_MAJOR_VERSION : ${{ env.POSTGRES_MAJOR_VERSION }}
55
60
run : |
56
61
packer init stage2-nix-psql.pkr.hcl
57
- GIT_SHA=${{github. sha}}
62
+ GIT_SHA=${{ steps.get_sha.outputs. sha }}
58
63
POSTGRES_MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }}
59
64
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
60
65
66
71
67
72
- name : Create nix flake revision tarball
68
73
run : |
69
- GIT_SHA=${{github. sha}}
74
+ GIT_SHA=${{ steps.get_sha.outputs. sha }}
70
75
MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }}
71
76
72
77
mkdir -p "/tmp/pg_upgrade_bin/${MAJOR_VERSION}"
@@ -116,7 +121,7 @@ jobs:
116
121
with :
117
122
name : ${{ steps.process_release_version.outputs.version }}
118
123
tag_name : ${{ steps.process_release_version.outputs.version }}
119
- target_commitish : ${{github. sha}}
124
+ target_commitish : ${{ steps.get_sha.outputs. sha }}
120
125
121
126
- name : Slack Notification on Failure
122
127
if : ${{ failure() }}
0 commit comments