| name: Build Bazel Bot Container | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - .github/workflows/build-bazel-bot-container.yml | |
| - 'google-bazel-bot/docker/**' | |
| - 'google-bazel-bot/bazel-bot/**' | |
| pull_request: | |
| paths: | |
| - .github/workflows/build-bazel-bot-container.yml | |
| - 'google-bazel-bot/docker/**' | |
| - 'google-bazel-bot/bazel-bot/**' | |
| jobs: | |
| build-container: | |
| if: github.repository_owner == 'llvm' | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| container-name: | |
| - 'bazel-buildkite' | |
| - 'bazel-fixer-bot' | |
| steps: | |
| - name: Checkout LLVM Zorg | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| sparse-checkout: google-bazel-bot/ | |
| - name: Build Container | |
| uses: llvm/llvm-project/.github/actions/build-container@12e957fd7feb388b266fd71ab7960450df6884c1 | |
| with: | |
| container-name: ${{ matrix.container-name }} | |
| context: google-bazel-bot/ | |
| target: ${{ matrix.container-name }} | |
| dockerfile: google-bazel-bot/docker/Dockerfile | |
| push-container: | |
| if: github.event_name == 'push' | |
| needs: | |
| - build-container | |
| permissions: | |
| packages: write | |
| runs-on: ubuntu-24.04 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: llvm/llvm-project/.github/actions/push-container@12e957fd7feb388b266fd71ab7960450df6884c1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} |