Skip to content

Run script and commit CSV #10

Run script and commit CSV

Run script and commit CSV #10

Workflow file for this run

name: Run script and commit CSV
on:
push:
workflow_dispatch:
schedule:
- cron: '0 8 * * 1'
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_CSV_TOKEN }}
permissions:
contents: write
issues: write
repository-projects: read
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Run script
run: node index.js
- name: Commit and push if it changed
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add projects.csv
git diff --quiet && git diff --staged --quiet || git commit -m "Update projects.csv"
git push