Skip to content

Commit

Permalink
Improve pull request context.
Browse files Browse the repository at this point in the history
  • Loading branch information
DFINITYManu committed Jan 23, 2025
1 parent 667852e commit a811838
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/update-k8s-deployments/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ runs:
# Update the refs in the requested files.
# Refs are assumed to be named sha-[0-9a-f]+.
sed -i "s~:sha-[a-f0-9]\{40\}\$~:sha-${GITHUB_SHA}~g" $FILES_TO_UPDATE
prev_commit=$(sed -rn 's~(.+):sha-([a-f0-9]{40})~\2~p' $FILES_TO_UPDATE | head -1)
sed -rin 's~(.+):sha-([a-f0-9]{40})~\1:sha-'"${GITHUB_SHA}"'\2~p' $FILES_TO_UPDATE
# commit changes if there are any
git add .
Expand All @@ -58,6 +59,7 @@ runs:
echo "k8s_branch=$K8S_REPO_BRANCH" >> $GITHUB_OUTPUT
echo "source_branch=$SOURCE_BRANCH" >> $GITHUB_OUTPUT
echo "previous_ref=$prev_commit" >> $GITHUB_OUTPUT
- name: "Create PR to roll out with updated container images"
id: create-rollout-pr
if: ${{ steps.create-rollout-commit.outputs.k8s_branch != '' }}
Expand All @@ -72,5 +74,5 @@ runs:
repo: 'k8s',
head: '${{ steps.create-rollout-commit.outputs.k8s_branch }}',
base: 'main',
body: 'Updating container images based on the latest changes in [this repository](https://github.com/dfinity/dre-airflow/commits/${{ steps.create-rollout-commit.outputs.source_branch }})'
body: 'Updating container images to incorporate [these changes](https://github.com/${{ vars.GITHUB_REPOSITORY }}/compare/${{ steps.create-rollout-commit.outputs.previous_ref }}..${{ steps.create-rollout-commit.outputs.source_branch }}).'
});

0 comments on commit a811838

Please sign in to comment.