Add support for short-lived tokens (#224)

The setup-gradle action tries to get a short-lived access token given the supplied Develocity access key.
This key can be passed either with the `DEVELOCITY_ACCESS_KEY` env var or via the  `develocity-access-key` input parameter.
If a token can be retrieved, then the `DEVELOCITY_ACCESS_KEY` env var will be set to the token. 
Otherwise the `DEVELOCITY_ACCESS_KEY` will be set to a blank string, to avoid a leak.

---------

Co-authored-by: daz <daz@gradle.com>
This commit is contained in:
Alexis Tual
2024-05-16 00:49:55 +02:00
committed by GitHub
parent eb13cf7170
commit 500e0ee5b3
10 changed files with 535 additions and 61 deletions

8
build
View File

@@ -16,12 +16,18 @@ case "$1" in
# Run act
$@
# Revert the changes to the dist directory
git co -- dist
git checkout -- dist
;;
init-scripts)
cd test/init-scripts
./gradlew check
;;
dist)
npm install
npm run build
cd ..
cp -r sources/dist .
;;
*)
npm install
npm run build