brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 0436e6e Raw
57 lines · yaml
1name: Build Metrics Container2 3permissions:4  contents: read5 6on:7  push:8    branches:9      - main10    paths:11      - .github/workflows/build-metrics-container.yml12      - '.ci/metrics/**'13  pull_request:14    branches:15      - main16    paths:17      - .github/workflows/build-metrics-container.yml18      - '.ci/metrics/**'19 20jobs:21  build-metrics-container:22    if: github.repository_owner == 'llvm'23    runs-on: ubuntu-24.0424    steps:25      - name: Checkout LLVM26        uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.027        with:28          sparse-checkout: |29            .ci/metrics/30            .github/actions/build-container31      - name: Build Container32        uses: ./.github/actions/build-container33        with:34          container-name: metrics35          context: .ci/metrics36          dockerfile: .ci/metrics/Dockerfile37  38  push-metrics-container:39    if: github.event_name == 'push'40    needs:41      - build-metrics-container42    permissions:43      packages: write44    runs-on: ubuntu-24.0445    env:46      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}47    steps:48      - name: Checkout LLVM49        uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.050        with:51          sparse-checkout: |52            .github/actions/push-container53 54      - uses: ./.github/actions/push-container55        with:56          token: ${{ secrets.GITHUB_TOKEN }}57