Skip to content

Commit

Permalink
chore: add copy of update-dist.yml to see if this fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
myyk committed Oct 16, 2023
1 parent bd337b8 commit 95bebb7
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/update-dist-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# When Dependabot updates dependency, this workflow synchronize the change
# to the /dist dir to let users enjoy new feature without manual sync.
name: Update the dist dir 2
on:
pull

permissions:
contents: write
pull-requests: write

jobs:
run-ncc:
runs-on: ubuntu-latest
timeout-minutes: 15
# if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
token: ${{ github.token }} # Replace github.token with PAT (personal access token) if you need to trigger a new workflow. https://git.io/JcHD9
- name: Use Node.js v16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
# It is not suggested to cache for the pull_request_target event
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
- name: Install dependencies
run: yarn install --immutable
- name: Update the dist directory
run: |
INPUT_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }} yarn run all
if [[ $(git status -s -- dist | wc -l) -gt 0 ]]; then
git add dist
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "chore: sync the dependency update to the /dist dir"
git push origin HEAD
fi
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 95bebb7

Please sign in to comment.