mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-21 15:38:59 +03:00
7b1b4d8cc6
This action, when supplied with the appropriate arguments, will create a Landscape glob from GITHUB_SHA [1] and deploy it OTA to the appropriate ship. It needs to be supplied the following: * ship name * base64-encoded GCP Service Account credentials * a base64-encoded SSH secret key to be used for GCP actions * the corresponding base64-encoded SSH public key [1]: https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables
33 lines
656 B
Bash
Executable File
33 lines
656 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
cd "$GITHUB_WORKSPACE" || exit
|
|
|
|
echo "$2" | base64 -d > service-account
|
|
echo "$3" | base64 -d > id_ssh
|
|
echo "$4" | base64 -d > id_ssh.pub
|
|
|
|
chmod 600 service-account
|
|
chmod 600 id_ssh
|
|
chmod 600 id_ssh.pub
|
|
|
|
janeway release glob --no-pill \
|
|
--credentials service-account \
|
|
--ssh-key id_ssh \
|
|
--do-it-live \
|
|
| bash
|
|
|
|
SHORTHASH=$(git rev-parse --short HEAD)
|
|
|
|
janeway release prepare-ota arvo-glob-"$SHORTHASH" "$1" \
|
|
--credentials service-account \
|
|
--ssh-key id_ssh \
|
|
--do-it-live \
|
|
| bash
|
|
|
|
janeway release perform-ota "$1" \
|
|
--credentials service-account \
|
|
--ssh-key id_ssh \
|
|
--do-it-live \
|
|
| bash
|
|
|