Skip to content

Commit e19df88

Browse files
committed
Add PR comment with pushed image info
1 parent 3428d9c commit e19df88

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/docker-mod-builder.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ jobs:
123123
echo "Pushed the following PR image/tag to GHCR:" >> $GITHUB_STEP_SUMMARY
124124
echo "ghcr.io/${ENDPOINT}:pull_request_${{ github.event.pull_request.number }}" >> $GITHUB_STEP_SUMMARY
125125
126+
- name: Add GHCR push comment to PR
127+
uses: peter-evans/create-or-update-comment@v3.0.0
128+
if: ${{ env.GITHUB_REPO == format('{0}/{1}', github.event.pull_request.base.repo.owner.login, github.event.pull_request.base.repo.name) && env.CR_USER && env.CR_PAT }}
129+
with:
130+
token: ${{ secrets.CR_PAT }}
131+
issue-number: ${{ github.event.pull_request.number }}
132+
body: |
133+
PR build pushed to `ghcr.io/${ENDPOINT}:pull_request_${{ github.event.pull_request.number }}`
134+
126135
- name: Login to DockerHub
127136
if: ${{ (github.event_name == 'push' && github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) && env.GITHUB_REPO == github.repository || env.GITHUB_REPO == format('{0}/{1}', github.event.pull_request.base.repo.owner.login, github.event.pull_request.base.repo.name)) && env.DOCKERUSER && env.DOCKERPASS }}
128137
run: |

0 commit comments

Comments
 (0)