Skip to content

chore(deps): bump @actions/core from 1.10.1 to 1.11.1 #61

chore(deps): bump @actions/core from 1.10.1 to 1.11.1

chore(deps): bump @actions/core from 1.10.1 to 1.11.1 #61

Workflow file for this run

# `dist/index.js` is a special file in Actions.
# When you reference an action with `uses:` in a workflow,
# `index.js` is the code that will run.
# For our project, we generate this file through a build process from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Check Dist
on:
pull_request:
push:
branches:
- main
paths-ignore:
- "**.md"
permissions:
contents: write
actions: write
jobs:
check-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/checkout@v4
if: github.event_name == 'push'
with:
fetch-depth: 0
- name: Set Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies and Rebuild the dist/ directory
run: |
npm ci
npm run build --if-present
- name: Compare the expected and actual dist/ directories
continue-on-error: true
id: diff
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --name-only
exit 1
fi
# If index.js was different than expected, upload the expected version as an artifact
- name: Commit files # commit the new dist folder
if: ${{ steps.diff.outcome == 'failure' }}
run: |
git config --local user.email "igorjs@users.noreply.github.com"
git config --local user.name "GitHub Action CI"
git add ./dist
git commit -m "chore(ci): update dist folder"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}