Bot Updating Templated Files

This commit is contained in:
LinuxServer-CI 2025-10-24 18:44:49 +00:00
parent 687a06106a
commit 96acd98421
No known key found for this signature in database

15
Jenkinsfile vendored
View file

@ -1009,8 +1009,9 @@ pipeline {
environment name: 'EXIT_STATUS', value: '' environment name: 'EXIT_STATUS', value: ''
} }
steps { steps {
sh '''#! /bin/bash
echo "Auto-generating release notes" echo "Auto-generating release notes"
sh '''if [ "$(git tag --points-at HEAD)" != "" ]; then if [ "$(git tag --points-at HEAD)" != "" ]; then
echo "Existing tag points to current commit, suggesting no new LS changes" echo "Existing tag points to current commit, suggesting no new LS changes"
AUTO_RELEASE_NOTES="No changes" AUTO_RELEASE_NOTES="No changes"
else else
@ -1018,17 +1019,16 @@ pipeline {
-d '{"tag_name":"'${META_TAG}'",\ -d '{"tag_name":"'${META_TAG}'",\
"target_commitish": "nightly"}' \ "target_commitish": "nightly"}' \
| jq -r '.body' | sed 's|## What.s Changed||') | jq -r '.body' | sed 's|## What.s Changed||')
fi''' fi
echo "Pushing New tag for current commit ${META_TAG}" echo "Pushing New tag for current commit ${META_TAG}"
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
-d '{"tag":"'${META_TAG}'",\ -d '{"tag":"'${META_TAG}'",\
"object": "'${COMMIT_SHA}'",\ "object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to nightly",\ "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to nightly",\
"type": "commit",\ "type": "commit",\
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
echo "Pushing New release for Tag" echo "Pushing New release for Tag"
sh '''#! /bin/bash curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_RELEASE_CLEAN} | jq -r '.commit.message' > releasebody.json
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_RELEASE_CLEAN} | jq '.commit.message' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
jq -n \ jq -n \
--arg tag_name "$META_TAG" \ --arg tag_name "$META_TAG" \
--arg target_commitish "nightly" \ --arg target_commitish "nightly" \
@ -1042,7 +1042,8 @@ pipeline {
"body": ("**CI Report:**\\n\\n" + $ci_url + "\\n\\n**LinuxServer Changes:**\\n\\n" + $ls_notes + "\\n\\n**Remote Changes:**\\n\\n" + $remote_notes), "body": ("**CI Report:**\\n\\n" + $ci_url + "\\n\\n**LinuxServer Changes:**\\n\\n" + $ls_notes + "\\n\\n**Remote Changes:**\\n\\n" + $remote_notes),
"draft": false, "draft": false,
"prerelease": true }' > releasebody.json.done "prerelease": true }' > releasebody.json.done
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done''' curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
'''
} }
} }
// Add protection to the release branch // Add protection to the release branch