Skip to content

Commit 1ab5fed

Browse files
author
Eric Stroczynski
authored
workflows/deploy-manual: patch ansible-operator Dockerfile with new base image tag and create a PR on successful base image build (#4741)
Signed-off-by: Eric Stroczynski <[email protected]>
1 parent db952f2 commit 1ab5fed

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/deploy-manual.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,20 @@ jobs:
5151
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
5252
push: true
5353
tags: ${{ steps.tag.outputs.tag }}
54+
55+
# This change will be staged and committed in the PR pushed below.
56+
# The script below will fail if no change was made.
57+
- name: update ansible-operator base
58+
run: |
59+
set -e
60+
sed -i -E 's|FROM quay\.io/operator-framework/ansible-operator-base:.+|FROM '"${{ steps.tag.outputs.tag }}"'|' images/ansible-operator/Dockerfile
61+
git diff --exit-code --quiet && echo "Failed to update images/ansible-operator/Dockerfile" && exit 1
62+
63+
- name: create PR
64+
uses: peter-evans/create-pull-request@v3
65+
with:
66+
title: "[auto] image(ansible-operator): bump base to ${{ steps.tag.outputs.tag }}"
67+
commit-message: "[auto] image(ansible-operator): bump base to ${{ steps.tag.outputs.tag }}"
68+
body: "New ansible-operator-base image built by https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
69+
delete-branch: true
70+
branch-suffix: -ansible-operator-base

0 commit comments

Comments
 (0)