Update Global Config #1756
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
name: Update Global Config | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'embeddedconfig/global.yaml.tmpl' | |
schedule: | |
- cron: "0 */12 * * *" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
- name: Granting private modules access | |
run: | | |
git config --global url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/" | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- run: | | |
cd ./embeddedconfig | |
go generate | |
cd - | |
cd ./config | |
go test | |
cd - | |
git config user.name github-actions | |
git config user.email [email protected] | |
git pull | |
git add embeddedconfig/global.yaml | |
git commit -m "pushing auto-generated embedded global config" | |
echo "pushing to main" | |
git push origin main |