Skip to content

Refactor CI pipeline action #18359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ on:

jobs:
create-runner:
uses: ./.github/workflows/create_runner.yml
secrets: inherit
uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@secrets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we update @secrets to @main before merging (which I guess means merge the PR for the secrets branch?). Think otherwise this will break once the secrets branch gets removed due to the PR merging

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to that in a different PR. I am using the same thing for dedicated.

Think otherwise this will break once the secrets branch gets removed due to the PR merging

Good point. That said, that feature is disabled in the gce-github-runner repository.

secrets:
runner_token: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
concurrency:
group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-create-runner
cancel-in-progress: false
Expand Down Expand Up @@ -426,10 +428,9 @@ jobs:
- install
- monitoring
- integration-test
uses: ./.github/workflows/remove_runner.yml
secrets: inherit
uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@secrets
secrets:
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}
with:
runner-label: ${{ needs.create-runner.outputs.label }}
concurrency:
group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-delete-runner
cancel-in-progress: false
machine-zone: ${{ needs.create-runner.outputs.machine-zone }}
12 changes: 8 additions & 4 deletions .github/workflows/code-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ on:

jobs:
create-runner:
uses: ./.github/workflows/create_runner.yml
secrets: inherit
uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@secrets
secrets:
runner_token: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}

build:
runs-on: ${{ needs.create-runner.outputs.label }}
Expand Down Expand Up @@ -57,7 +59,9 @@ jobs:
needs:
- create-runner
- build
uses: ./.github/workflows/remove_runner.yml
secrets: inherit
uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@secrets
secrets:
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}
with:
runner-label: ${{ needs.create-runner.outputs.label }}
machine-zone: ${{ needs.create-runner.outputs.machine-zone }}
36 changes: 0 additions & 36 deletions .github/workflows/create_runner.yml

This file was deleted.

12 changes: 8 additions & 4 deletions .github/workflows/ide-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ on:

jobs:
create-runner:
uses: ./.github/workflows/create_runner.yml
secrets: inherit
uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@secrets
secrets:
runner_token: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}

configuration:
name: Configuration
Expand Down Expand Up @@ -202,7 +204,9 @@ jobs:
- infrastructure
- check
- delete
uses: ./.github/workflows/remove_runner.yml
secrets: inherit
uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@secrets
secrets:
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}
with:
runner-label: ${{ needs.create-runner.outputs.label }}
machine-zone: ${{ needs.create-runner.outputs.machine-zone }}
12 changes: 8 additions & 4 deletions .github/workflows/lacework-inline-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ on:

jobs:
create-runner:
uses: ./.github/workflows/create_runner.yml
secrets: inherit
uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@secrets
secrets:
runner_token: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}

configuration:
name: Configuration
Expand Down Expand Up @@ -80,7 +82,9 @@ jobs:
- create-runner
- configuration
- scan-images
uses: ./.github/workflows/remove_runner.yml
secrets: inherit
uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@secrets
secrets:
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}
with:
runner-label: ${{ needs.create-runner.outputs.label }}
machine-zone: ${{ needs.create-runner.outputs.machine-zone }}
Loading