forked from Docker/baseimage-docker
Deduplicate release permission warning in workflow
This commit is contained in:
committed by
Jeshua Ben Joseph
parent
f9ad45439e
commit
4abf322a1e
@@ -153,10 +153,9 @@ jobs:
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "${GH_RELEASE_EXIT_CODE}" -ne 0 ]; then
|
if [ "${GH_RELEASE_EXIT_CODE}" -ne 0 ]; then
|
||||||
if [ "${GH_RELEASE_EXIT_CODE}" -eq 4 ]; then
|
RELEASE_PERMISSION_WARNING="Skipping GitHub release creation for ${{ steps.release.outputs.next_tag }} because the workflow token cannot create releases."
|
||||||
echo "::warning::Skipping GitHub release creation for ${{ steps.release.outputs.next_tag }} because the workflow token cannot create releases."
|
if [ "${GH_RELEASE_EXIT_CODE}" -eq 4 ] || (echo "${GH_RELEASE_OUTPUT}" | grep -Eq "HTTP 403|Resource not accessible by integration"); then
|
||||||
elif echo "${GH_RELEASE_OUTPUT}" | grep -Eq "HTTP 403|Resource not accessible by integration"; then
|
echo "::warning::${RELEASE_PERMISSION_WARNING}"
|
||||||
echo "::warning::Skipping GitHub release creation for ${{ steps.release.outputs.next_tag }} because the workflow token cannot create releases."
|
|
||||||
else
|
else
|
||||||
echo "::error::${GH_RELEASE_OUTPUT}"
|
echo "::error::${GH_RELEASE_OUTPUT}"
|
||||||
exit ${GH_RELEASE_EXIT_CODE}
|
exit ${GH_RELEASE_EXIT_CODE}
|
||||||
|
|||||||
Reference in New Issue
Block a user