Skip to content

update

update #328

Workflow file for this run

name: update
on:
schedule:
- cron: "0 0 * * SUN"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: "master"
- uses: actions/setup-go@v5
with:
go-version: "1.21.x"
- name: Create access token file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "$GITHUB_TOKEN" > access_token.txt
- name: Run update script
run: go run list2md.go
- name: Update the list
env:
GITHUB_USER: "mingrammer"
GITHUB_EMAIL: "mingrammer@gmail.com"
run: |
git config user.name "${GITHUB_USER}"
git config user.email "${GITHUB_EMAIL}"
git add -A
if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
fi
git commit -m "chore: auto update"
git push