Skip to content

Commit ee6a90d

Browse files
committed
chore: tag the correct commit when creating a release
1 parent cfbf434 commit ee6a90d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/ami-release.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,21 @@ jobs:
1717

1818
- name: Build AMI
1919
run: |
20-
GIT_SHA=$(git rev-parse HEAD)
20+
GIT_SHA=${{github.sha}}
2121
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.vars.pkr.hcl" amazon-arm64.pkr.hcl
2222
2323
- name: Grab release version
2424
id: process_release_version
2525
run: |
2626
VERSION=$(sed -e 's/postgres-version = "\(.*\)"/\1/g' common.vars.pkr.hcl)
27-
GIT_SHA=$(git rev-parse HEAD)
2827
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
29-
echo "git_sha=$GIT_SHA" >> "$GITHUB_OUTPUT"
3028
3129
- name: Create release
3230
uses: softprops/action-gh-release@v1
3331
with:
3432
name: ${{ steps.process_release_version.outputs.version }}
3533
tag_name: ${{ steps.process_release_version.outputs.version }}
36-
target_commitish: ${{ steps.process_release_vesion.outputs.git_sha }}
34+
target_commitish: ${{github.sha}}
3735

3836
- name: Slack Notification on Failure
3937
if: ${{ failure() }}

0 commit comments

Comments
 (0)