github.com/symfony-cli/symfony-cli@v0.0.0-20240514161054-ece2df437dfa/.github/workflows/go_generate_update.yml (about) 1 name: Update generated code 2 3 on: 4 workflow_dispatch: ~ 5 schedule: 6 - cron: '0 8-18/4 * * 1-5' 7 8 jobs: 9 update: 10 name: Update generated code 11 runs-on: ubuntu-latest 12 steps: 13 - 14 name: Checkout 15 uses: actions/checkout@v3 16 - 17 name: Set up Go 18 uses: actions/setup-go@v5 19 with: 20 go-version-file: 'go.mod' 21 - 22 name: Prepare 23 run: | 24 rm -rf ~/.platformsh/bin/ 25 go generate ./ 26 - 27 name: Check Git status 28 id: git 29 run: | 30 RESULT=$(git status --untracked-files=no --porcelain) 31 echo "gitstatus=$RESULT" >> $GITHUB_OUTPUT 32 - 33 name: Test 34 if: steps.git.outputs.gitstatus != '' 35 run: go test -v ./... 36 - name: Validate build 37 if: steps.git.outputs.gitstatus != '' 38 run: go run . 39 - 40 name: Commit and push the update 41 if: steps.git.outputs.gitstatus != '' 42 run: | 43 git config user.email "41898282+github-actions[bot]@users.noreply.github.com" 44 git config user.name "github-actions[bot]" 45 git add local/platformsh/commands.go local/platformsh/config.go 46 git commit -m "chore: Update supported Platform.sh services" 47 git push