Skip to content

Commit

Permalink
[CHORE] JavaScript flow: use push token on checkout (hedyorg#3696)
Browse files Browse the repository at this point in the history
We need to check out the source with a push-enabled token, otherwise the commit action later on will fail. Never mind that we pass that the correct token, it will not overwrite the token in the git checkout.

**How to test**
Run more workflows and see if they fail.
  • Loading branch information
rix0rrr authored Nov 23, 2022
1 parent dc9f2c7 commit 066ec0c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/update-javascript-on-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ jobs:

steps:
- uses: actions/checkout@v3
name: Checkout branch (with token)
if: github.event_name == 'push'
with:
fetch-depth: 1

# We need to pass the token here -- the commit action below will not overwrite the token to push.
token: ${{ secrets.FELIENNE_GITHUB_ACCESS_TOKEN }}
- uses: actions/checkout@v3
name: Checkout branch (on pull requests)
if: github.event_name != 'push'
with:
fetch-depth: 1
- name: Install Nodejs dependencies
Expand Down

0 comments on commit 066ec0c

Please sign in to comment.