From 41b21d8450dd3e3cbd735fdfb0a0dfdb9608c78e Mon Sep 17 00:00:00 2001 From: Eric Norris Date: Wed, 19 May 2021 12:40:22 -0400 Subject: [PATCH] fix: specify origin when determining previous SHA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 51f1fb8..80b67e1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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" \