Cron Go #2332
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Cron Go | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 6,12,18,0 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
- name: Generate | |
run: go run -v ./... | |
- name: Commit and push | |
env: | |
TOKEN: ${{ secrets.PAT }} | |
EMAIL: ${{ secrets.EMAIL }} | |
run: | | |
git config --global user.name "$GITHUB_REPOSITORY_OWNER" | |
git config --global user.email "$EMAIL" | |
git remote set-url --push origin https://$GITHUB_REPOSITORY_OWNER:$TOKEN@github.com/$GITHUB_REPOSITORY | |
git add -A | |
git commit -m "[CRON] mappings.json updated" | |
git push |