mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-25 23:51:07 -05:00
parent
7ea2fd764e
commit
0031981b46
2 changed files with 34 additions and 9 deletions
|
@ -127,7 +127,7 @@ CommitAndPush() {
|
||||||
# Push the code to the branch and create PR
|
# Push the code to the branch and create PR
|
||||||
PUSH_CMD=$(
|
PUSH_CMD=$(
|
||||||
git push --set-upstream origin "Automation-Release-${VERSION}"
|
git push --set-upstream origin "Automation-Release-${VERSION}"
|
||||||
gh pr create --title "Update-to-release-${VERSION}" --body "Automation Upgrade version ${VERSION} to action.yml" 2>&1
|
gh pr create --title "Release-update-to-${VERSION}" --body "Automation Upgrade version ${VERSION} to action.yml" 2>&1
|
||||||
)
|
)
|
||||||
|
|
||||||
# Load the error code
|
# Load the error code
|
||||||
|
@ -186,12 +186,14 @@ UpdatePRBody() {
|
||||||
echo "Updating PR body with Release information and Issue linkage..."
|
echo "Updating PR body with Release information and Issue linkage..."
|
||||||
|
|
||||||
# Need to update the body of the PR with the information
|
# Need to update the body of the PR with the information
|
||||||
UPDATE_PR_CMD=$(curl -s --fail -X PATCH \
|
UPDATE_PR_CMD=$(
|
||||||
|
curl -s --fail -X PATCH \
|
||||||
--url "${GITHUB_API}/repos/${ORG}/${REPO}/pulls/${PR_ID}" \
|
--url "${GITHUB_API}/repos/${ORG}/${REPO}/pulls/${PR_ID}" \
|
||||||
-H 'Accept: application/vnd.github.shadow-cat-preview+json,application/vnd.github.sailor-v-preview+json' \
|
-H 'Accept: application/vnd.github.shadow-cat-preview+json,application/vnd.github.sailor-v-preview+json' \
|
||||||
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
|
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
--data "{\"body\": \"Automation Creation of Super-Linter\n\nThis closes #${ISSUE_NUMBER}\n\n${UPDATED_BODY_STRING}\"}" 2>&1)
|
--data "{\"body\": \"Automation Creation of Super-Linter\n\nThis closes #${ISSUE_NUMBER}\n\n${UPDATED_BODY_STRING}\"}" 2>&1
|
||||||
|
)
|
||||||
|
|
||||||
# Load the error code
|
# Load the error code
|
||||||
ERROR_CODE=$?
|
ERROR_CODE=$?
|
||||||
|
@ -205,6 +207,29 @@ UpdatePRBody() {
|
||||||
else
|
else
|
||||||
echo "Successfully updated PR body"
|
echo "Successfully updated PR body"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Add the label for the release
|
||||||
|
UPDATE_LABEL_CMD=$(
|
||||||
|
curl -s --fail -X POST \
|
||||||
|
--url "${GITHUB_API}/repos/${ORG}/${REPO}/issues/${PR_ID}/labels" \
|
||||||
|
-H 'Accept: application/vnd.github.v3+json' \
|
||||||
|
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
--data '{"labels":["Release"]}' 2>&1
|
||||||
|
)
|
||||||
|
|
||||||
|
# Load the error code
|
||||||
|
ERROR_CODE=$?
|
||||||
|
|
||||||
|
# Check the shell for errors
|
||||||
|
if [ "${ERROR_CODE}" -ne 0 ]; then
|
||||||
|
# ERROR
|
||||||
|
echo "ERROR! Failed to update PR label!"
|
||||||
|
echo "ERROR:[$UPDATE_LABEL_CMD]"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Successfully updated PR label"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
################################################################################
|
################################################################################
|
||||||
#### Function UpdateReleaseBodyString ##########################################
|
#### Function UpdateReleaseBodyString ##########################################
|
||||||
|
|
4
.github/workflows/deploy-RELEASE.yml
vendored
4
.github/workflows/deploy-RELEASE.yml
vendored
|
@ -66,7 +66,7 @@ jobs:
|
||||||
# Update deployment API #
|
# Update deployment API #
|
||||||
#########################
|
#########################
|
||||||
- name: Start deployment
|
- name: Start deployment
|
||||||
uses: bobheadxi/deployments@v0.5.1
|
uses: bobheadxi/deployments@v0.4.3
|
||||||
id: deployment
|
id: deployment
|
||||||
with:
|
with:
|
||||||
step: start
|
step: start
|
||||||
|
@ -173,7 +173,7 @@ jobs:
|
||||||
# Update Deployment API #
|
# Update Deployment API #
|
||||||
#########################
|
#########################
|
||||||
- name: Update deployment status
|
- name: Update deployment status
|
||||||
uses: bobheadxi/deployments@v0.5.1
|
uses: bobheadxi/deployments@v0.4.3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
step: finish
|
step: finish
|
||||||
|
|
Loading…
Reference in a new issue