Skip to content

Commit 206a8c2

Browse files
committed
github.registry --> GITHUB_REGISTRY env var
1 parent 6bbea8d commit 206a8c2

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/actions/docker-image-comment/action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ runs:
3333
shell: bash
3434
env:
3535
GH_TOKEN: ${{ inputs.github_token }}
36+
GITHUB_REPOSITORY: ${{ github.repository }}
3637
PR_NUMBER: ${{ inputs.pr_number }}
3738
COMMENT_TAG: ${{ inputs.comment_tag }}
3839
IMAGE_NAME: ${{ inputs.image_name }}
@@ -59,7 +60,7 @@ runs:
5960
6061
# Find existing comment
6162
COMMENT_ID=$(gh pr view ${PR_NUMBER} \
62-
--repo ${{ github.repository }} \
63+
--repo ${GITHUB_REPOSITORY} \
6364
--json comments \
6465
--jq '.comments[] | select(.body | contains("'"${COMMENT_IDENTIFIER}"'")) | .id')
6566
@@ -70,17 +71,17 @@ runs:
7071
if ! gh api \
7172
--method PATCH \
7273
-H "Accept: application/vnd.github+json" \
73-
"/repos/${{ github.repository }}/issues/comments/${COMMENT_ID}" \
74+
"/repos/${GITHUB_REPOSITORY}/issues/comments/${COMMENT_ID}" \
7475
-f body="${COMMENT_BODY}" 2>/dev/null; then
7576
# Comment no longer exists, create a new one
7677
gh pr comment ${PR_NUMBER} \
77-
--repo ${{ github.repository }} \
78+
--repo ${GITHUB_REPOSITORY} \
7879
--body "${COMMENT_BODY}"
7980
fi
8081
else
8182
# Create new comment
8283
gh pr comment ${PR_NUMBER} \
83-
--repo ${{ github.repository }} \
84+
--repo ${GITHUB_REPOSITORY} \
8485
--body "${COMMENT_BODY}"
8586
fi
8687
else
@@ -89,6 +90,6 @@ runs:
8990
gh api \
9091
--method DELETE \
9192
-H "Accept: application/vnd.github+json" \
92-
"/repos/${{ github.repository }}/issues/comments/${COMMENT_ID}" 2>/dev/null || true
93+
"/repos/${GITHUB_REPOSITORY}/issues/comments/${COMMENT_ID}" 2>/dev/null || true
9394
fi
9495
fi

0 commit comments

Comments
 (0)