Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/compile-dependabot-updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Compile Dependabot Updates

on:
pull_request:

jobs:
build:
# PR was opened by Dependabot PR has 'javascript' label
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' && contains(join(github.event.pull_request.labels.*.name, ','), 'javascript') }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Pull Request
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build and package
run: npm run build && npm run package

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 1

commit-artifacts:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Pull Request
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
persist-credentials: false

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Commit and push build artifacts
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add dist/
git commit -m "[dependabot skip] Update dist/ with compiled dependencies" && git push || exit 0
Loading