fix: use local age binary instead of sudo install
All checks were successful
Terraform / terraform (push) Successful in 8s
All checks were successful
Terraform / terraform (push) Successful in 8s
This commit is contained in:
@@ -48,10 +48,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
AGE_PUBLIC_KEY: ${{ secrets.AGE_PUBLIC_KEY }}
|
AGE_PUBLIC_KEY: ${{ secrets.AGE_PUBLIC_KEY }}
|
||||||
run: |
|
run: |
|
||||||
# Install age if not present
|
# Install age locally (no sudo in container)
|
||||||
if ! command -v age &> /dev/null; then
|
if ! command -v age &> /dev/null; then
|
||||||
curl -sL https://github.com/FiloSottile/age/releases/download/v1.1.1/age-v1.1.1-linux-amd64.tar.gz | tar xz
|
curl -sL https://github.com/FiloSottile/age/releases/download/v1.1.1/age-v1.1.1-linux-amd64.tar.gz | tar xz
|
||||||
sudo mv age/age age/age-keygen /usr/local/bin/
|
export PATH="$PWD/age:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Extract all setup key values
|
# Extract all setup key values
|
||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
|
|
||||||
# Encrypt with age
|
# Encrypt with age
|
||||||
if [ -n "$AGE_PUBLIC_KEY" ]; then
|
if [ -n "$AGE_PUBLIC_KEY" ]; then
|
||||||
age -r "$AGE_PUBLIC_KEY" -o setup-keys.json.age setup-keys.json
|
./age/age -r "$AGE_PUBLIC_KEY" -o setup-keys.json.age setup-keys.json
|
||||||
rm setup-keys.json
|
rm setup-keys.json
|
||||||
echo "Setup keys encrypted to setup-keys.json.age"
|
echo "Setup keys encrypted to setup-keys.json.age"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user