Skip to content

Commit 2b59288

Browse files
committed
Chore: fix fast-forward workflow
1 parent 3793ec2 commit 2b59288

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

.github/workflows/fast-forward.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616

1717
outputs:
1818
should_run: ${{ steps.check_branch.outputs.should_run }}
19+
head_sha: ${{ steps.check_branch.outputs.head_sha }}
1920

2021
steps:
2122
- name: Check comment
@@ -93,6 +94,7 @@ jobs:
9394
BASE_REF=$(jq -r ".base.ref" <$GITHUB_PR)
9495
if [ "$BASE_REF" = "main" ]; then
9596
echo "should_run=true" >> $GITHUB_OUTPUT
97+
echo "head_sha=$(jq -r ".head.sha" <$GITHUB_PR)" >> $GITHUB_OUTPUT
9698
check_pr_merged
9799
else
98100
echo "should_run=false" >> $GITHUB_OUTPUT
@@ -113,21 +115,11 @@ jobs:
113115
statuses: write
114116

115117
steps:
116-
- name: Get PR Branch
117-
id: get_pr_branch
118-
run: |
119-
PR_NUMBER=${{ github.event.issue.number }}
120-
PR_BRANCH=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
121-
"https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" \
122-
| jq -r .head.ref)
123-
124-
echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT
125-
126118
- name: Checkout Repo
127119
uses: actions/checkout@v4
128120
with:
129121
fetch-depth: 0
130-
ref: ${{ steps.get_pr_branch.outputs.branch }}
122+
ref: ${{ needs.fast-forward.outputs.head_sha }}
131123

132124
- name: Setup
133125
uses: ./.github/actions/node-setup

.yarnrc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,4 @@ plugins:
1616
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
1717
spec: "https://mskelton.dev/yarn-outdated/v3"
1818

19-
pnpmStoreFolder: ./.yarn/cache/.store
20-
2119
yarnPath: .yarn/releases/yarn-4.9.1.cjs

0 commit comments

Comments
 (0)