chore(deps): update tektoncd-pipeline-next-webhook to 2d723a6 #5533
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: operator-update-images | |
| on: | |
| push: | |
| branches: | |
| - next | |
| - main | |
| - release-v* | |
| paths: | |
| - project.yaml | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: 'Select Environment' | |
| required: true | |
| default: 'devel' | |
| type: choice | |
| options: | |
| - devel | |
| - staging | |
| - production | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| update-csv: | |
| runs-on: ubuntu-latest | |
| if: github.repository_owner == 'openshift-pipelines' # do not run this elsewhere | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout the current repo | |
| uses: actions/checkout@v5 | |
| - name: update-image-references | |
| run: | | |
| # Update operator's payload and stuff | |
| make ENVIRONMENT=${{github.event.inputs.environment}} update-reference | |
| - name: Commit new changes | |
| run: | | |
| BASE_BRANCH=${GITHUB_REF#refs/heads/} | |
| SOURCE_BRANCH=actions/update/operator-update-images-${BASE_BRANCH} | |
| git config user.name openshift-pipelines-bot | |
| git config user.email pipelines-extcomm@redhat.com | |
| git checkout -b ${SOURCE_BRANCH} | |
| git add -f head .konflux olm | |
| if [[ -z $(git status --porcelain --untracked-files=no) ]]; then | |
| echo "No change, exiting" | |
| exit 0 | |
| fi | |
| git commit -F- <<EOF | |
| [bot:${BASE_BRANCH}] Update generate Cluster Service Version (CSV) | |
| EOF | |
| git push -f origin ${SOURCE_BRANCH} | |
| pr_list=$(gh pr list --base ${BASE_BRANCH} --head ${SOURCE_BRANCH} --json number) | |
| if [ "$(echo $pr_list | jq length)" = "0" ]; then | |
| echo "creating PR..." | |
| gh pr create -B ${BASE_BRANCH} -H ${SOURCE_BRANCH} --label=automated --label=lgtm --label=approved --fill | |
| else | |
| echo "a PR already exists, editing..." | |
| sleep 10 | |
| gh pr edit $(echo $pr_list | jq .[0].number) --add-label=lgtm --add-label=approved | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |