| name: Build Metrics Container |
| |
| permissions: |
| contents: read |
| |
| on: |
| push: |
| branches: |
| - main |
| paths: |
| - .github/workflows/build-metrics-container.yml |
| - '.ci/metrics/**' |
| pull_request: |
| branches: |
| - main |
| paths: |
| - .github/workflows/build-metrics-container.yml |
| - '.ci/metrics/**' |
| |
| jobs: |
| build-metrics-container: |
| if: github.repository_owner == 'llvm' |
| runs-on: ubuntu-24.04 |
| steps: |
| - name: Checkout LLVM |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| with: |
| persist-credentials: false |
| sparse-checkout: | |
| .ci/metrics/ |
| .github/actions/build-container |
| - name: Build Container |
| uses: ./.github/actions/build-container |
| with: |
| container-name: metrics |
| context: .ci/metrics |
| dockerfile: .ci/metrics/Dockerfile |
| |
| push-metrics-container: |
| if: github.event_name == 'push' |
| needs: |
| - build-metrics-container |
| permissions: |
| packages: write |
| runs-on: ubuntu-24.04 |
| env: |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| steps: |
| - name: Checkout LLVM |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| with: |
| persist-credentials: false |
| sparse-checkout: | |
| .github/actions/push-container |
| |
| - uses: ./.github/actions/push-container |
| with: |
| token: ${{ secrets.GITHUB_TOKEN }} |