Skip to content

Commit

Permalink
fix: specify origin when determining previous SHA
Browse files Browse the repository at this point in the history
Since the workflow is triggered on a git tag, git rev-parse will say
"fatal: Needed a single revision” if you don't specify origin/main.
  • Loading branch information
ericnorris committed May 19, 2021
1 parent 1c13eab commit 41b21d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export MESSAGE="chore: regenerate homebrew formula"
export SHA=$(git rev-parse --verify main:Formula/terraform-demux.rb)
export SHA=$(git rev-parse --verify origin/main:Formula/terraform-demux.rb)
export CONTENT=$(base64 -i dist/terraform-demux.rb)
gh api --method PUT /repos/:owner/:repo/contents/Formula/terraform-demux.rb \
--field message="$MESSAGE" \
Expand Down

0 comments on commit 41b21d8

Please sign in to comment.