Skip to content

Commit b01b5b9

Browse files
committed
ci: gate toolstate repo pushes on the TOOLSTATE_PUBLISH envvar
Unfortunately due to an Azure quirk the TOOLSTATE_REPO_ACCESS_TOKEN is not suitable to gate whether to push new commits to the repo, as if it's not defined on the Azure side it will actually be set to the literal `$(TOOLSTATE_REPO_ACCESS_TOKEN)`, which screws everything up. This instead adds another, non-secret environment variable to gate publishing: TOOLSTATE_PUBLISH. As non-secret environment variables behave correctly this fixes the issue.
1 parent a7f2867 commit b01b5b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/ci/docker/x86_64-gnu-tools/checktools.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ $COMMIT\t$(cat "$TOOLSTATE_FILE")
112112
}
113113

114114
if [ "$RUST_RELEASE_CHANNEL" = nightly ]; then
115-
if [ -n "${TOOLSTATE_REPO_ACCESS_TOKEN+is_set}" ]; then
115+
if [ -n "${TOOLSTATE_PUBLISH+is_set}" ]; then
116116
. "$(dirname $0)/repo.sh"
117117
MESSAGE_FILE=$(mktemp -t msg.XXXXXX)
118118
echo "($OS CI update)" > "$MESSAGE_FILE"

0 commit comments

Comments
 (0)