Skip to content

Commit 62ec096

Browse files
authored
Refactor CI pipeline action (#18359)
* Refactor CI pipeline action * Cleanup * Update secrets
1 parent 54c2040 commit 62ec096

10 files changed

+305
-350
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ on:
1313

1414
jobs:
1515
create-runner:
16-
uses: ./.github/workflows/create_runner.yml
17-
secrets: inherit
16+
uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@secrets
17+
secrets:
18+
runner_token: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
19+
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
1820
concurrency:
1921
group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-create-runner
2022
cancel-in-progress: false
@@ -426,10 +428,9 @@ jobs:
426428
- install
427429
- monitoring
428430
- integration-test
429-
uses: ./.github/workflows/remove_runner.yml
430-
secrets: inherit
431+
uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@secrets
432+
secrets:
433+
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}
431434
with:
432435
runner-label: ${{ needs.create-runner.outputs.label }}
433-
concurrency:
434-
group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-delete-runner
435-
cancel-in-progress: false
436+
machine-zone: ${{ needs.create-runner.outputs.machine-zone }}

.github/workflows/code-nightly.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ on:
77

88
jobs:
99
create-runner:
10-
uses: ./.github/workflows/create_runner.yml
11-
secrets: inherit
10+
uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@secrets
11+
secrets:
12+
runner_token: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
13+
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
1214

1315
build:
1416
runs-on: ${{ needs.create-runner.outputs.label }}
@@ -57,7 +59,9 @@ jobs:
5759
needs:
5860
- create-runner
5961
- build
60-
uses: ./.github/workflows/remove_runner.yml
61-
secrets: inherit
62+
uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@secrets
63+
secrets:
64+
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}
6265
with:
6366
runner-label: ${{ needs.create-runner.outputs.label }}
67+
machine-zone: ${{ needs.create-runner.outputs.machine-zone }}

.github/workflows/create_runner.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/ide-integration-tests.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ on:
2121

2222
jobs:
2323
create-runner:
24-
uses: ./.github/workflows/create_runner.yml
25-
secrets: inherit
24+
uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@secrets
25+
secrets:
26+
runner_token: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
27+
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
2628

2729
configuration:
2830
name: Configuration
@@ -202,7 +204,9 @@ jobs:
202204
- infrastructure
203205
- check
204206
- delete
205-
uses: ./.github/workflows/remove_runner.yml
206-
secrets: inherit
207+
uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@secrets
208+
secrets:
209+
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}
207210
with:
208211
runner-label: ${{ needs.create-runner.outputs.label }}
212+
machine-zone: ${{ needs.create-runner.outputs.machine-zone }}

.github/workflows/lacework-inline-scanner.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ on:
1414

1515
jobs:
1616
create-runner:
17-
uses: ./.github/workflows/create_runner.yml
18-
secrets: inherit
17+
uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@secrets
18+
secrets:
19+
runner_token: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
20+
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
1921

2022
configuration:
2123
name: Configuration
@@ -80,7 +82,9 @@ jobs:
8082
- create-runner
8183
- configuration
8284
- scan-images
83-
uses: ./.github/workflows/remove_runner.yml
84-
secrets: inherit
85+
uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@secrets
86+
secrets:
87+
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}
8588
with:
8689
runner-label: ${{ needs.create-runner.outputs.label }}
90+
machine-zone: ${{ needs.create-runner.outputs.machine-zone }}

0 commit comments

Comments
 (0)