Skip to content

Bump @actions/core from 2.0.2 to 3.0.0 #104

Bump @actions/core from 2.0.2 to 3.0.0

Bump @actions/core from 2.0.2 to 3.0.0 #104

Workflow file for this run

name: Dependabot PR

Check failure on line 1 in .github/workflows/update-dist.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-dist.yaml

Invalid workflow file

(Line: 68, Col: 13): Unexpected symbol: '"version-update:semver-patch"'. Located at position 50 within expression: steps.dependabot-metadata.outputs.update-type == "version-update:semver-patch"
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- dependabot/**
jobs:
update-dist:
name: Update dist
runs-on: ubuntu-22.04
if: >
startsWith(github.head_ref, 'dependabot/npm_and_pnpm') &&
github.actor == 'dependabot[bot]'
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v6.0.2
with:
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v6.2.0
with:
node-version: '20'
- name: Setup pnpm
run: npm install --location=global pnpm
- name: Install dependencies
run: pnpm install
- name: Update dist
run: pnpm build
- name: Commit new dist
uses: stefanzweifel/git-auto-commit-action@v7
with:
file_pattern: dist
commit_message: Build dist
auto-approve-pr:
name: Update dist
runs-on: ubuntu-22.04
if: >
startsWith(github.head_ref, 'dependabot/npm_and_pnpm') &&
github.actor == 'dependabot[bot]'
needs: [update-dist]
permissions:
pull-requests: write
steps:
- name: Check out code
uses: actions/checkout@v6.0.2
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2.5.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
if: ${{ steps.dependabot-metadata.outputs.update-type == "version-update:semver-patch" }}
run: |
gh pr checkout "$PR_URL"
[ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ] \
&& gh pr review --approve "$PR_URL" -b "LGTM :rocket:"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}