cloudflare/pint
Publicmirrored from https://github.com/cloudflare/pintAvailable
.github/workflows/ci.yml
41lines · modecode
| 1 | name: pint ci |
| 2 | |
| 3 | on: |
| 4 | pull_request: |
| 5 | branches: |
| 6 | - main |
| 7 | |
| 8 | permissions: |
| 9 | pull-requests: write |
| 10 | |
| 11 | jobs: |
| 12 | ci: |
| 13 | runs-on: ubuntu-latest |
| 14 | if: ${{ github.event.pull_request.head.repo.full_name == 'cloudflare/pint' }} |
| 15 | steps: |
| 16 | - name: Check out code |
| 17 | uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 18 | with: |
| 19 | show-progress: false |
| 20 | fetch-depth: 0 |
| 21 | |
| 22 | - name: Fetch main branch |
| 23 | run: | |
| 24 | git fetch origin main |
| 25 | git checkout main |
| 26 | git fetch origin $GITHUB_HEAD_REF |
| 27 | git checkout $GITHUB_HEAD_REF -- |
| 28 | |
| 29 | - name: Set up Go |
| 30 | uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 |
| 31 | with: |
| 32 | go-version-file: go.ver |
| 33 | cache: false |
| 34 | |
| 35 | - name: Compile pint |
| 36 | run: make build |
| 37 | |
| 38 | - name: Run pint ci |
| 39 | run: ./pint -l debug -c .github/pint/pint.hcl ci |
| 40 | env: |
| 41 | GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 42 | |