CP-31115: Unify KUTTL testing infrastructure and modernize GitHub Act… #31
Workflow file for this run
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: Manual Prepare Release | |
| on: [] # Temporarily disabled for testing | |
| jobs: | |
| release-to-main: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| ssh-key: ${{ secrets.VERSION_BUMP_DEPLOY_KEY }} | |
| persist-credentials: true | |
| fetch-depth: 0 # fetch the whole repo history | |
| - name: Verify release notes exist | |
| run: test -f "helm/docs/releases/${{ github.event.inputs.version }}.md" | |
| - name: Setup Git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install tools | |
| run: make install-tools | |
| - name: Update image version in Helm chart | |
| run: | | |
| sed -ri "s/^( *[a-z]*): +[^ ]+ (# <- Software release corresponding to this chart version.)$/\1: ${{ github.event.inputs.version }} \2/" helm/values.yaml helm/templates/_helpers.tpl | |
| make helm-test-template app/functions/helmless/default-values.yaml format | |
| git add helm/values.yaml helm/templates/*.tpl tests/helm/template/*.yaml app/functions/helmless/default-values.yaml | |
| if ! git diff --quiet --staged; then | |
| git commit -m "Update image version in Helm chart to ${{ github.event.inputs.version }}" | |
| else | |
| echo "No changes to commit - files are already up to date for version ${{ github.event.inputs.version }}" | |
| fi | |
| - name: Checkout main branch | |
| run: git checkout main | |
| - name: Merge develop into main | |
| run: git merge --ff-only develop | |
| - name: Tag release | |
| run: git tag -a "v${{ github.event.inputs.version }}" -m "Release ${{ github.event.inputs.version }}" | |
| - name: Push changes to main | |
| run: git push --atomic origin develop main "v${{ github.event.inputs.version }}" | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag_name: v${{ github.event.inputs.version }} | |
| body_path: helm/docs/releases/${{ github.event.inputs.version }}.md | |
| prerelease: ${{ contains(github.event.inputs.version, '-beta-') || contains(github.event.inputs.version, '-rc-') }} | |
| draft: true |