Skip to content

Commit 546685a

Browse files
committed
just use secret for token and not env
1 parent 4a6c180 commit 546685a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.github/workflows/terraform_gh_runner.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ jobs:
4646
# Extract the token value from the response
4747
runner_token=$(echo "$response" | jq -r '.token')
4848
49-
# Export the token as an environment variable
50-
echo "export RUNNER_TOKEN=$runner_token" >> $GITHUB_ENV
51-
5249
# Store the token as a secret in GitHub Actions for use
5350
# in subsequent steps with terraform for runner registration
5451
gh secret set RUNNER_TOKEN -r "$repo" -b "$runner_token"
@@ -63,4 +60,4 @@ jobs:
6360
run: |
6461
terraform init-backend-config="organization=subspace" -backend-config="workspaces=${{ secrets.WORKSPACE_NAME }}"
6562
terraform plan -var-file=/tmp/terraform.tfvars
66-
terraform apply -auto-approve -var "gh_token=${{ env.RUNNER_TOKEN }}" -var-file=/tmp/terraform.tfvars
63+
terraform apply -auto-approve -var "gh_token=${{ secrets.RUNNER_TOKEN }}" -var-file=/tmp/terraform.tfvars

0 commit comments

Comments
 (0)