workflows/deploy-manual: set branch name in auto-PR title and body
@@ -55,16 +55,19 @@ jobs:
# 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
+ id: update
run: |
- set -e
- sed -i -E 's|FROM quay\.io/operator-framework/ansible-operator-base:.+|FROM '"${{ steps.tag.outputs.tag }}"'|' images/ansible-operator/Dockerfile
+ set -ex
+ sed -i -E 's|FROM quay\.io/operator-framework/ansible-operator-base:.+|FROM ${{ steps.tag.outputs.tag }}|g' images/ansible-operator/Dockerfile
git diff --exit-code --quiet && echo "Failed to update images/ansible-operator/Dockerfile" && exit 1
+ REF="${{ github.event.ref }}"
+ echo ::set-output name=branch_name::"${REF##*/}"
- 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 }}"
+ title: "[${{ steps.update.outputs.branch_name }}] image(ansible-operator): bump base to ${{ steps.tag.outputs.tag }}"
+ commit-message: "[${{ steps.update.outputs.branch_name }}] 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
