ACS-12381 Migrate to GitHub App Tokens (#1694)

* ACS-12380 Use env-load-from-yaml to read RELEASE_VERSION and DEVELOPMENT_VERSION

* ACS-12380 Pin action usages to an immutable commit SHA

* ACS-12380 Adjust versions

* ACS-12381 Migrate to Github App token

* ACS-12381 Use sha

* ACS-12381 Adjust release-versions.yml

* ACS-12381 Use AUTH variable

* ACS-12381 Remove set +x
This commit is contained in:
Damian Ujma
2026-08-21 09:40:08 +02:00
committed by GitHub
parent 0ad5202494
commit bc532346d8
4 changed files with 101 additions and 69 deletions
+5 -3
View File
@@ -20,7 +20,7 @@ function cloneRepo() {
rm -rf "$(basename "${REPO%.git}")"
git clone -b "${TAG_OR_BRANCH}" --depth=1 "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REPO}"
git clone -b "${TAG_OR_BRANCH}" --depth=1 "https://${AUTH}${REPO}"
popd >/dev/null
}
@@ -76,7 +76,9 @@ function remoteBranchExists() {
local REMOTE_REPO="${1}"
local BRANCH="${2}"
git ls-remote --exit-code --heads "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REMOTE_REPO}" "${BRANCH}" &>/dev/null
git ls-remote --exit-code --heads "https://${AUTH}${REMOTE_REPO}" "${BRANCH}" &>/dev/null
return "${RESULT}"
}
function identifyUpstreamSourceBranch() {
@@ -175,7 +177,7 @@ function retieveLatestTag() {
local LOCAL_PATH="/tmp/$(basename "${REPO%.git}")"
git clone -q -b "${BRANCH}" "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REPO}" "${LOCAL_PATH}"
git clone -q -b "${BRANCH}" "https://${AUTH}${REPO}" "${LOCAL_PATH}"
pushd "${LOCAL_PATH}" >/dev/null
git describe --abbrev=0 --tags
-34
View File
@@ -1,34 +0,0 @@
#!/usr/bin/env bash
echo "=========================== Starting Release Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
if [ -z "${RELEASE_VERSION}" ] || [ -z "${DEVELOPMENT_VERSION}" ]; then
echo "Please provide a Release and Development version in the format <acs-version>-<additional-info> (e.g. 7.2.0-A2)"
exit 1
fi
# Use full history for release
git checkout -B "${BRANCH_NAME}"
# Define git identity for commits
git config user.email "${GIT_EMAIL}"
git config user.name "${GIT_USERNAME}"
mvn -B \
-ntp \
-Prelease,all-tas-tests -Pags \
-DreleaseVersion="${RELEASE_VERSION}" \
-DdevelopmentVersion="${DEVELOPMENT_VERSION}" \
"-Darguments=-Prelease,all-tas-tests -Pags -DskipTests -Dbuild-number=${BUILD_NUMBER}" \
release:clean release:prepare release:perform \
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
-Dusername="${GIT_USERNAME}" \
-Dpassword="${GIT_PASSWORD}"
popd
set +vex
echo "=========================== Finishing Release Script =========================="