This repository was archived by the owner on Feb 10, 2026. It is now read-only.
Bump Goa version and updates gen directory on main branch
#1285
This file contains hidden or 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: Bump Goa version and updates `gen` directory on main branch | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| bump-payloads: | |
| name: "Bump payloads" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Goa bump | |
| run: | | |
| export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
| # Get the current version | |
| currentVersion=$(go list -mod=mod -m all | grep goa.design/goa/v3 | awk '{print $2}') | |
| echo ${currentVersion} | |
| # Get the list of all versions | |
| listAllLatestVersions=( $(go list -mod=mod -m -versions goa.design/goa/v3) ) | |
| echo ${listAllLatestVersions[-1]} | |
| # Compare the versions | |
| if [ "${currentVersion}" != "${listAllLatestVersions[-1]}" ] | |
| then | |
| # Update goa version in presbumite-test.sh | |
| go_install_command="go install goa.design/goa/v3/cmd/goa@" | |
| sed -i "s#${go_install_command}v[0-9]\+\.[0-9]\+\.[0-9]\+#${go_install_command}${listAllLatestVersions[-1]}#" test/presubmit-tests.sh | |
| # Update goa version in go.mod | |
| sed -i "s@goa.design/goa/v3 ${currentVersion}@goa.design/goa/v3 ${listAllLatestVersions[-1]}@g" go.mod | |
| sed -i "s@goa.design/plugins/v3 ${currentVersion}@goa.design/plugins/v3 ${listAllLatestVersions[-1]}@g" go.mod | |
| go mod tidy | |
| go mod vendor | |
| go install goa.design/goa/v3/cmd/goa@v3 | |
| goa version | |
| echo "----------------------------" | |
| echo "-- Generating API Design... " | |
| echo "----------------------------" | |
| cd api && go mod vendor && goa gen github.com/tektoncd/hub/api/design | |
| echo "----------------------------" | |
| echo "- Generating v1 API Design... " | |
| echo "----------------------------" | |
| cd v1 && go mod vendor && goa gen github.com/tektoncd/hub/api/v1/design | |
| fi | |
| - name: create pull request | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| with: | |
| token: ${{ secrets.TEKTON_BOT_TOKEN }} | |
| commit-message: Bumps goa version and updates the gen folder | |
| committer: tekton-bot <tekton-bot@users.noreply.github.com> | |
| author: Vincent Demeester <vdemeest@redhat.com> | |
| # author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
| signoff: true | |
| delete-branch: true | |
| title: "[bot] Bump goa version and updates gen folder" | |
| labels: | | |
| release-note-none |