Check for OSP nightly and create a PR #171
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: update-osp-nightly | |
run-name: Check for OSP nightly and create a PR | |
on: | |
schedule: | |
- cron: '10 1 * * *' | |
workflow_dispatch: | |
permissions: {} # drop all permissions; the default triggers codecov failure | |
jobs: | |
update-osp-nightly: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update CatalogSource | |
run: | | |
tag="v4.14-candidate" | |
inspected=$(skopeo inspect docker://quay.io/openshift-pipeline/openshift-pipelines-pipelines-operator-bundle-container-index:$tag) | |
created=$(echo "$inspected" | jq -r '.Created') | |
echo "DEBUG: Found tag $tag created: $created" | |
digest=$(echo "$inspected" | jq -r '.Digest') | |
echo "DEBUG: Tag digest: $digest" | |
sed -i -E "s/sha256:[0-9a-f]{64}/${digest}/g" operator/gitops/argocd/pipeline-service/openshift-pipelines/osp-nightly-catalog-source.yaml | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
# the branch name is used by other jobs to open infra-deployments PR | |
# and skip downgrade tests. | |
branch: ci-update-osp-nightly | |
commit-message: "[new-osp-nightly-build] automated change" | |
title: "Automated change updating the OSP nightly version" | |
body: | | |
Automated change by [update-osp-nightly] |