Skip to content

Go

Go #108

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: Go
on:
push:
branches: [ "master" ]
schedule:
- cron: "0 0 * * 0"
env:
GIT_USER_NAME: xiaoler
GIT_USER_EMAIL: scholer_l@live.com
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Build
run: go run cmd/main.go -o README.md -t ${{ secrets.UPDATE_TOKEN }}
- name: Set up Git
run: |
git config --global user.name ${{ env.GIT_USER_NAME }}
git config --global user.email ${{ env.GIT_USER_EMAIL }}
- name: Commit to Git
if: ${{ !env.ACT }}
run: |
git add README.md
git commit -m "Update README.md"
git push