regenerate #505
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: regenerate | |
on: | |
schedule: | |
- cron: '30 3 * * *' | |
pull_request: {} | |
workflow_dispatch: {} | |
jobs: | |
regenerate-all-channels: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: auth with gcloud | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}' | |
- name: setup gcloud | |
uses: google-github-actions/setup-gcloud@v2 | |
with: | |
version: '>= 451.0.1' | |
- name: setup golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: run regenerate | |
env: | |
GOOGLE_LOCATION: us-central1-c | |
run: ./generate-all.sh | |
- name: commit changes | |
if: github.event_name == 'schedule' | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "github-actions@users.noreply.github.com" | |
git add ./static/rapid.json ./static/regular.json ./static/stable.json | |
git diff-index --quiet HEAD || \ | |
git commit -m "Regenerated all GKE channels" && \ | |
git push |