Skip to content

Commit 1b396df

Browse files
committed
Add variables to use the same GCP disk
Signed-off-by: Julien Adamek <julien.adamek@suse.com>
1 parent eb8e932 commit 1b396df

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/master-e2e.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ on:
5353
type: string
5454
runner_template:
5555
description: Runner template to use
56-
default: capi-e2e-ci-runner-spot-x86-64-template-n2-highmem-32-v4
56+
default: capi-e2e-ci-runner-spot-x86-64-template-n2-highmem-32-v5
5757
type: string
5858
test_description:
5959
description: Short description of the test
@@ -86,7 +86,9 @@ jobs:
8686
id: generator
8787
run: |
8888
UUID=$(uuidgen)
89+
GH_REPO=${{ github.repository }}
8990
echo "uuid=${UUID}" >> ${GITHUB_OUTPUT}
91+
#echo "runner=${GH_REPO//\//-}-ci-${UUID}" >> ${GITHUB_OUTPUT}
9092
echo "runner=capi-ci-${UUID}" >> ${GITHUB_OUTPUT}
9193
- name: Authenticate to GCP
9294
uses: google-github-actions/auth@v1
@@ -250,7 +252,7 @@ jobs:
250252
echo "K3s on Rancher Manager: ${{ env.INSTALL_K3S_VERSION }}" >> ${GITHUB_STEP_SUMMARY}
251253
echo "K8s version deployed on the cluster(s): ${{ inputs.k8s_version_to_provision }}" >> ${GITHUB_STEP_SUMMARY}
252254
delete-runner:
253-
if: ${{ always() && needs.create-runner.result == 'success' && inputs.destroy_runner == true }}
255+
if: ${{ always() }}
254256
needs: [create-runner, e2e]
255257
runs-on: ubuntu-latest
256258
steps:
@@ -263,10 +265,12 @@ jobs:
263265
credentials_json: ${{ secrets.credentials }}
264266
- name: Setup gcloud
265267
uses: google-github-actions/setup-gcloud@v1
266-
- name: Delete PAT token secret
268+
- name: Delete GCP secrets
267269
run: |
268-
gcloud --quiet secrets delete PAT_TOKEN_${{ needs.create-runner.outputs.uuid }}
270+
gcloud --quiet secrets delete PAT_TOKEN_${{ needs.create-runner.outputs.uuid }} || true
271+
gcloud --quiet secrets delete GH_REPO_${{ needs.create-runner.outputs.uuid }} || true
269272
- name: Delete runner
273+
if: ${{ always() && needs.create-runner.result == 'success' && inputs.destroy_runner == true }}
270274
run: |
271275
gcloud --quiet compute instances delete ${{ needs.create-runner.outputs.runner }} \
272276
--delete-disks all \

0 commit comments

Comments
 (0)