Fix autoformatting push to main in GitHub workflow
The push-to-main job was not correctly fetching the latest commit
(with formatting fixes) from the queue-main branch before pushing to main.
This ensures the latest changes are used.
Co-Authored-By: sketch <hello@sketch.dev>
diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml
index b4dc41e..5cc77e3 100644
--- a/.github/workflows/formatting.yml
+++ b/.github/workflows/formatting.yml
@@ -17,6 +17,8 @@
jobs:
formatting:
+ outputs:
+ commit_sha: ${{ steps.get_commit.outputs.commit_sha }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -76,3 +78,7 @@
if [[ "${{ github.ref }}" == refs/heads/queue-main-* ]]; then
git push -f https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/boldsoftware/sketch.git HEAD
fi
+
+ - name: Get commit SHA
+ id: get_commit
+ run: echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT