Skip to content

Commit

Permalink
Set expiration time for GCP runner secrets (#177)
Browse files Browse the repository at this point in the history
* Set expiration time for GCP runner secrets
* Expiration time for GCP secrets prolonged to 10h
---------

Signed-off-by: Tomas Hehejik <thehejik@suse.com>
  • Loading branch information
thehejik authored Oct 4, 2024
1 parent d05d294 commit 396e1ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ jobs:
- name: Create GCP secrets
run: |
echo -n ${{ secrets.PAT_TOKEN }} \
| gcloud secrets create PAT_TOKEN_${{ steps.generator.outputs.uuid }} --data-file=-
| gcloud secrets create PAT_TOKEN_${{ steps.generator.outputs.uuid }} --ttl="36000s" --quiet --data-file=-
echo -n ${{ github.repository }} \
| gcloud secrets create GH_REPO_${{ steps.generator.outputs.uuid }} --data-file=-
| gcloud secrets create GH_REPO_${{ steps.generator.outputs.uuid }} --ttl="36000s" --quiet --data-file=-
installation-and-e2e-tests:
runs-on: ${{ needs.create-runner.outputs.uuid }}
Expand Down Expand Up @@ -377,9 +377,10 @@ jobs:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v2
- name: Delete PAT token secret
- name: Delete GCP secrets
run: |
gcloud --quiet secrets delete PAT_TOKEN_${{ needs.create-runner.outputs.uuid }}
gcloud --quiet secrets delete GH_REPO_${{ needs.create-runner.outputs.uuid }}
- name: Delete runner
run: |
gcloud --quiet compute instances delete ${{ needs.create-runner.outputs.runner }} \
Expand Down

0 comments on commit 396e1ae

Please sign in to comment.