Bump components.yaml on release branches #680
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: Bump components.yaml on release branches | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: {} | |
schedule: | |
# Run this every week day at 2AM | |
- cron: '0 2 * * 1-5' | |
jobs: | |
build-release-matrix: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'tektoncd' # do not run this elsewhere | |
steps: | |
- id: set-matrix | |
run: | | |
SUPPORTED_BRANCHES=$(git ls-remote --heads https://github.com/tektoncd/operator 'release-*' | grep -v 'v0.2[0-9].*\|v0.5[0-9]\.*\|v0.6[0-7]\.*' | awk '{ print $2 }' | cut -d/ -f3- | jq -cRs 'split("\n")[:-1]') | |
echo "Supported Branches: ${SUPPORTED_BRANCHES}" | |
echo "branches=${SUPPORTED_BRANCHES}" >> $GITHUB_OUTPUT | |
outputs: | |
branches: ${{ steps.set-matrix.outputs.branches }} | |
bump-payloads: | |
needs: build-release-matrix | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
branch: ${{ fromJSON(needs.build-release-matrix.outputs.branches) }} | |
# branch: [release-v0.62.x, release-v0.63.x] | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.x | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.branch }} | |
- name: run operator-tool bump-bugfix | |
run: | | |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
make components/bump-bugfix | |
- name: create pull request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Bump payloads versions | |
committer: Vincent Demeester <[email protected]> | |
author: Vincent Demeester <[email protected]> | |
signoff: true | |
# author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
branch: bot-bump-payload-${{ matrix.branch }} | |
delete-branch: true | |
title: "[bot] bump payload versions" | |
labels: | | |
release-note-none |