Skip to content

Cron Go

Cron Go #2340

Workflow file for this run

# 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