Build(deps-dev): Bump @types/node from 20.14.9 to 22.7.4 #942
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check npm ci & build | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: | |
jobs: | |
check: | |
name: check npm ci & build | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
cache: "npm" | |
registry-url: "https://registry.npmjs.org" | |
- name: check npm ci | |
run: npm ci | |
- name: check npm build | |
run: npm run build | |
- name: check type | |
run: npm run type-check | |
- name: check npm diff | |
id: diff | |
if: github.event_name == 'pull_request' | |
run: | | |
echo -n "$(npm diff ./dist)" > dist.diff | |
[ ! -s dist.diff ] && exit 0 | |
echo "DIFF=true" >> $GITHUB_OUTPUT | |
cat << EOF > comment.md | |
[INFO] dist diff | |
\`\`\`diff | |
$(cat dist.diff) | |
\`\`\` | |
EOF | |
gh pr comment -F ./comment.md ${{ github.event.pull_request.number }} | |
- uses: dependabot/fetch-metadata@v2 | |
id: metadata | |
if: >- | |
github.event_name == 'pull_request' && | |
github.event.pull_request.user.login == 'dependabot[bot]' | |
- name: auto-merge dependabot PR | |
if: >- | |
(steps.metadata.outputs.update-type == 'version-update:semver-minor' || | |
steps.metadata.outputs.update-type == 'version-update:semver-patch') && | |
steps.diff.outputs.DIFF == '' | |
run: | | |
gh pr merge ${{ github.event.pull_request.number }} --auto --merge |