Skip to content

Commit

Permalink
Automatically update dist for dependabot PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
jawilson committed Feb 6, 2024
1 parent e71bb86 commit 59c79ac
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/update-dist-on-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Update action dist on dependabot PRs
on:
push:
branches:
- dependabot/npm_and_yarn/**
pull_request:
branches:
- dependabot/npm_and_yarn/**


jobs:
update-action-dist:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.ACTIONS_APP_ID }}
private-key: ${{ secrets.ACTIONS_APP_PEM }}

- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ steps.generate_token.outputs.token }}

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Update action dist
run: npm ci && npm run prepare

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update action dist
branch: ${{ github.head_ref }}
commit_user_name: ${{ github.actor }}
commit_user_email: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com

0 comments on commit 59c79ac

Please sign in to comment.