33 pull_request :
44
55jobs :
6- create-runner :
7- uses : gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@main
8- secrets :
9- runner_token : ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
10- gcp_credentials : ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
11- concurrency :
12- group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-create-runner
13- cancel-in-progress : false
14-
156 build :
16- runs-on : ${{ needs.create-runner.outputs.label }}
17- needs : create-runner
7+ runs-on : ubuntu-latest
188 concurrency :
199 group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-build
2010 cancel-in-progress : true
2111 env :
2212 DAZZLE_VERSION : 0.1.17
2313 BUILDKIT_VERSION : 0.12.3
2414 steps :
15+ - name : 🧹 Free disk space
16+ run : |
17+ echo "Before cleanup:"
18+ df -h
19+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
20+ sudo docker image prune --all --force
21+ echo "After cleanup:"
22+ df -h
23+
2524 - name : 📥 Checkout workspace-images
2625 uses : actions/checkout@v5
27- with :
28- repository : gitpod-io/workspace-images
2926
3027 - name : 🔧 Setup pre-commit
3128 run : |
@@ -40,14 +37,20 @@ jobs:
4037
4138 - name : 🔆 Install dazzle
4239 run : |
43- curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v${{env.DAZZLE_VERSION}}/dazzle_${{env.DAZZLE_VERSION}}_Linux_x86_64.tar.gz | sudo tar -xvz -C /usr/local/bin
40+ curl -fsSL --retry 3 --retry-delay 5 -o /tmp/dazzle.tar.gz https://github.com/gitpod-io/dazzle/releases/download/v${{env.DAZZLE_VERSION}}/dazzle_${{env.DAZZLE_VERSION}}_Linux_x86_64.tar.gz
41+ sudo tar -xvzf /tmp/dazzle.tar.gz -C /usr/local/bin
42+ rm /tmp/dazzle.tar.gz
4443
4544 - name : 🏗️ Setup buildkit
4645 run : |
47- curl -sSL https://github.com/moby/buildkit/releases/download/v${{env.BUILDKIT_VERSION}}/buildkit-v${{env.BUILDKIT_VERSION}}.linux-amd64.tar.gz | sudo tar xvz -C /usr
48- sudo buildkitd --oci-worker=true --oci-worker-net=host --debug --group docker &
49- sudo su -c "while ! test -S /run/buildkit/buildkitd.sock; do sleep 0.1; done"
50- sudo chmod +777 /run/buildkit/buildkitd.sock
46+ curl -fsSL --retry 3 --retry-delay 5 -o /tmp/buildkit.tar.gz https://github.com/moby/buildkit/releases/download/v${{env.BUILDKIT_VERSION}}/buildkit-v${{env.BUILDKIT_VERSION}}.linux-amd64.tar.gz
47+ sudo tar -xvzf /tmp/buildkit.tar.gz -C /usr
48+ rm /tmp/buildkit.tar.gz
49+ sudo nohup buildkitd --oci-worker=true --oci-worker-net=host --debug --group docker > /tmp/buildkitd.log 2>&1 &
50+ echo "Waiting for buildkitd socket..."
51+ timeout 30 bash -c 'while ! test -S /run/buildkit/buildkitd.sock; do sleep 0.5; done'
52+ sudo chmod 777 /run/buildkit/buildkitd.sock
53+ echo "buildkitd is ready"
5154
5255 # A hack as GH action does not allow you to force override cache storing if there was a cache hit
5356 # https://github.com/actions/cache/issues/628#issuecomment-986118455
7679 - name : 🖇️ Dazzle combine
7780 run : |
7881 dazzle combine localhost:5000/workspace-base-images --all
79-
80- delete-runner :
81- if : always()
82- needs :
83- - create-runner
84- - build
85- uses : gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@main
86- secrets :
87- gcp_credentials : ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
88- with :
89- runner-label : ${{ needs.create-runner.outputs.label }}
90- machine-zone : ${{ needs.create-runner.outputs.machine-zone }}
0 commit comments