-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (29 loc) · 911 Bytes
/
cron-go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# 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