Skip to content

Count task completion when PR merged #2

Count task completion when PR merged

Count task completion when PR merged #2

name: Count task completion when PR merged
on:
pull_request:
types: [closed]
branches:
- main
paths:
- members/*/**
workflow_dispatch:
jobs:
count:
if: github.event_name == "workflow_dispatch" || github.event.pull_request.merged == true

Check failure on line 14 in .github/workflows/count-task-completion.yml

View workflow run for this annotation

GitHub Actions / Count task completion when PR merged

Invalid workflow file

The workflow is not valid. .github/workflows/count-task-completion.yml (Line: 14, Col: 9): Unexpected symbol: '"workflow_dispatch"'. Located at position 22 within expression: github.event_name == "workflow_dispatch" || github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 14.15.3
- name: Count task completion
run: node scripts/count.js
- name: Commit changes
run: |
cd site-dist
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "chore: update counted task completion"
- uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}