chore(deps-dev): bump @types/node from 18.16.3 to 22.8.1 #557
Workflow file for this run
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: Build and Push | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '16.x' | |
- name: npm install, build | |
run: | | |
npm install | |
npm run build | |
- name: Check diff | |
id: diff | |
run: | | |
set -x | |
git add -N . | |
git_diff=$(git diff --name-only) | |
files="${git_diff//$'\n'/, }" | |
echo "::set-output name=diff::$files" | |
- name: Comment on PullRequest | |
uses: thollander/actions-comment-pull-request@v2 | |
if: ${{ steps.diff.outputs.diff }} | |
with: | |
message: | | |
When the build result on the PR was checked, the following files were changed: | |
${{ steps.diff.outputs.diff }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Commit & Push | |
if: ${{ steps.diff.outputs.diff && github.actor != 'dependabot[bot]' }} | |
run: | | |
set -x | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
git add . | |
git commit --author=. -m 'bot: build' | |
git push | |
dependabot: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} | |
needs: build-and-push | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Dependabot metadata | |
id: metadata | |
uses: dependabot/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Enable auto-merge for Dependabot PRs | |
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }} | |
run: gh pr merge --auto --merge "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |