|
1 | 1 | name: "Workspace integration tests"
|
2 | 2 | on:
|
3 |
| - push: |
4 |
| - branches: |
5 |
| - - main |
6 | 3 | workflow_dispatch:
|
7 | 4 | inputs:
|
8 | 5 | name:
|
9 | 6 | required: false
|
| 7 | + type: string |
10 | 8 | description: "The name of the preview environment, or leave empty to use a default name"
|
11 | 9 | version:
|
12 | 10 | required: false
|
| 11 | + type: string |
13 | 12 | description: "The version of Gitpod to install (leave empty to target the latest successful build on main)"
|
14 | 13 | skip_deploy:
|
15 | 14 | required: false
|
|
19 | 18 | required: false
|
20 | 19 | type: boolean
|
21 | 20 | description: "Skip delete preview environment (debug only)"
|
| 21 | + workflow_call: |
| 22 | + inputs: |
| 23 | + name: |
| 24 | + required: false |
| 25 | + type: string |
| 26 | + description: "The name of the preview environment, or leave empty to use a default name" |
| 27 | + version: |
| 28 | + required: false |
| 29 | + type: string |
| 30 | + description: "The version of Gitpod to install (leave empty to target the latest successful build on main)" |
22 | 31 | schedule:
|
23 | 32 | - cron: "0 3,12 * * *"
|
24 | 33 |
|
@@ -58,19 +67,19 @@ jobs:
|
58 | 67 | env:
|
59 | 68 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
60 | 69 | run: |
|
61 |
| - if [[ '${{ github.event.inputs.name }}' != '' ]]; then |
| 70 | + if [[ '${{ inputs.name }}' != '' ]]; then |
62 | 71 | {
|
63 |
| - echo "name=${{ github.event.inputs.name }}" |
| 72 | + echo "name=${{ inputs.name }}" |
64 | 73 | } >> $GITHUB_OUTPUT
|
65 | 74 | else
|
66 | 75 | {
|
67 | 76 | echo "name=workspace-integration-test-${{ github.run_id }}-${{ github.run_attempt }}"
|
68 | 77 | } >> $GITHUB_OUTPUT
|
69 | 78 | fi
|
70 | 79 |
|
71 |
| - if [[ '${{ github.event.inputs.version }}' != '' ]]; then |
| 80 | + if [[ '${{ inputs.version }}' != '' ]]; then |
72 | 81 | {
|
73 |
| - echo "version=${{ github.event.inputs.version }}" |
| 82 | + echo "version=${{ inputs.version }}" |
74 | 83 | } >> $GITHUB_OUTPUT
|
75 | 84 | else
|
76 | 85 | # Find the most recent successful build on main. Look back up to 10 builds.
|
@@ -109,7 +118,7 @@ jobs:
|
109 | 118 | infrastructure_provider: gce
|
110 | 119 | large_vm: true
|
111 | 120 | - name: Deploy Gitpod to the preview environment
|
112 |
| - if: github.event.inputs.skip_deploy != 'true' |
| 121 | + if: inputs.skip_deploy != 'true' |
113 | 122 | id: deploy-gitpod
|
114 | 123 | uses: ./.github/actions/deploy-gitpod
|
115 | 124 | with:
|
@@ -150,7 +159,7 @@ jobs:
|
150 | 159 | delete:
|
151 | 160 | name: Delete preview environment
|
152 | 161 | needs: [configuration, infrastructure, check, create-runner]
|
153 |
| - if: github.event.inputs.skip_delete != 'true' && always() |
| 162 | + if: inputs.skip_delete != 'true' && always() |
154 | 163 | runs-on: ${{ needs.create-runner.outputs.label }}
|
155 | 164 | container:
|
156 | 165 | image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-oci-tool-gha.14121
|
|
0 commit comments