Autofix: upgrade-lang-java #1975
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build from Pull Request | |
| on: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest-16-cores | |
| concurrency: | |
| group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-build | |
| cancel-in-progress: true | |
| env: | |
| DAZZLE_VERSION: 0.1.17 | |
| BUILDKIT_VERSION: 0.12.3 | |
| steps: | |
| - name: π§Ή Free disk space | |
| run: | | |
| echo "Before cleanup:" | |
| df -h | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | |
| sudo docker image prune --all --force | |
| echo "After cleanup:" | |
| df -h | |
| - name: π₯ Checkout workspace-images | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # pin@v5 | |
| with: | |
| repository: gitpod-io/workspace-images | |
| - name: π§ Setup pre-commit | |
| run: | | |
| sudo apt-get install --yes python3-pip shellcheck | |
| curl -sSL https://github.com/mvdan/sh/releases/download/v3.5.0/shfmt_v3.5.0_linux_amd64 -o shfmt | |
| sudo mv shfmt /usr/local/bin/shfmt && sudo chmod +x /usr/local/bin/shfmt | |
| sudo pip3 install pre-commit | |
| - name: π€ Run pre-commit | |
| run: | | |
| pre-commit run --all-files | |
| - name: π Install dazzle | |
| run: | | |
| 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 | |
| sudo tar -xvzf /tmp/dazzle.tar.gz -C /usr/local/bin | |
| rm /tmp/dazzle.tar.gz | |
| - name: ποΈ Setup buildkit | |
| run: | | |
| 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 | |
| sudo tar -xvzf /tmp/buildkit.tar.gz -C /usr | |
| rm /tmp/buildkit.tar.gz | |
| sudo nohup buildkitd --oci-worker=true --oci-worker-net=host --debug --group docker > /tmp/buildkitd.log 2>&1 & | |
| echo "Waiting for buildkitd socket..." | |
| timeout 30 bash -c 'while ! test -S /run/buildkit/buildkitd.sock; do sleep 0.5; done' | |
| sudo chmod 777 /run/buildkit/buildkitd.sock | |
| echo "buildkitd is ready" | |
| # A hack as GH action does not allow you to force override cache storing if there was a cache hit | |
| # https://github.com/actions/cache/issues/628#issuecomment-986118455 | |
| - name: ποΈ Force Save Registry Cache Per Sha | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # pin@v4 | |
| with: | |
| path: ~/registry | |
| key: ${{ runner.os }}-pull-request-cache-${{ github.sha }} | |
| - name: ποΈ Restore Registry Cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # pin@v4 | |
| with: | |
| path: ~/registry | |
| key: ${{ runner.os }}-pull-request-cache-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-pull-request-cache- | |
| - name: π¦ Setup local registry | |
| run: | | |
| docker run -it --detach --publish 5000:5000 --volume ~/registry:/var/lib/registry registry:2 | |
| - name: π¨ Dazzle build | |
| run: | | |
| dazzle build localhost:5000/workspace-base-images | |
| - name: ποΈ Dazzle combine | |
| run: | | |
| dazzle combine localhost:5000/workspace-base-images --all |