workflows/deploy-manual: patch ansible-operator Dockerfile with new base image tag and create a PR on successful base image build
@@ -51,3 +51,20 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: ${{ steps.tag.outputs.tag }}
+
+ # This change will be staged and committed in the PR pushed below.
+ # The script below will fail if no change was made.
+ - name: update ansible-operator base
+ run: |
+ set -e
+ sed -i -E 's|FROM quay\.io/operator-framework/ansible-operator-base:.+|FROM '"${{ steps.tag.outputs.tag }}"'|' images/ansible-operator/Dockerfile
+ git diff --exit-code --quiet && echo "Failed to update images/ansible-operator/Dockerfile" && exit 1
+
+ - name: create PR
+ uses: peter-evans/create-pull-request@v3
+ with:
+ title: "[auto] image(ansible-operator): bump base to ${{ steps.tag.outputs.tag }}"
+ commit-message: "[auto] image(ansible-operator): bump base to ${{ steps.tag.outputs.tag }}"
+ body: "New ansible-operator-base image built by https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
+ delete-branch: true
+ branch-suffix: -ansible-operator-base
