Skip to content

Go CI

Go CI #103

Workflow file for this run

name: Go CI
on:
push:
branches:
- main
paths:
- main.go
- go.*
- .github/workflows/**
schedule:
- cron: 10 5 * * *
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.22'
- name: Compile and run main.go
run: |
go run .
- name: Commit generated files
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add -u
git diff-index --quiet HEAD || git commit -a -m "[auto] Update generated files"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main