Skip to content
Merged
Changes from all 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
41 changes: 41 additions & 0 deletions .github/workflows/rebuild-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Rebuild Action after Renovate PR
# cypress-io/github-action runs from the dist/ directory
# After Renovate has created a PR that updates dependencies,
# the built action in dist/ will be out of date.
# This workflow ensures that the contents of this directory
# are in sync with the source files by using
# npm run build which in turn calls ncc build to rebuild
# the dist/ directory
on:
pull_request:
branches:
- 'master'

jobs:
rebuild-dist:
if: startsWith(github.head_ref, 'renovate/')
runs-on: ubuntu-24.04
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v5 # https://github.com/actions/checkout
with:
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v4 # https://github.com/actions/setup-node
with:
# Action runs: using: node20 as defined in
# https://github.com/cypress-io/github-action/blob/master/action.yml
# Node.js minor version is aligned to
# https://github.com/actions/runner/blob/main/src/Misc/externals.sh
node-version: 20.19.5
- run: npm ci
- run: npm run format
- run: npm run build

- uses: stefanzweifel/git-auto-commit-action@v7 # https://github.com/stefanzweifel/git-auto-commit-action
with:
commit_message: 'chore: rebuild action after dependency update'
file_pattern: 'dist/*'