mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-15 06:10:32 +00:00
Merge branch 'main' into chore/upgrade-node-24
This commit is contained in:
commit
a2f230ecfa
2 changed files with 53 additions and 20 deletions
52
.github/workflows/renovate-dist-update.yml
vendored
Normal file
52
.github/workflows/renovate-dist-update.yml
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
name: Update Distribution on Renovate PRs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'package.json'
|
||||
- 'package-lock.json'
|
||||
- 'src/**'
|
||||
- 'tsconfig.json'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
update-dist:
|
||||
# Only run for Renovate PRs
|
||||
if: github.actor == 'renovate[bot]' || github.actor == 'renovate-bot'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout PR branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build and package
|
||||
run: npm run all
|
||||
|
||||
- name: Check for changes
|
||||
id: git-check
|
||||
run: |
|
||||
git diff --exit-code dist/ || echo "changed=true" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Commit and push changes
|
||||
if: steps.git-check.outputs.changed == 'true'
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add dist/
|
||||
git commit -m "chore: rebuild distribution"
|
||||
git push
|
||||
Loading…
Add table
Add a link
Reference in a new issue