cloudflare/pint
Publicmirrored from https://github.com/cloudflare/pintAvailable
.github/workflows/ci.yml
39lines · 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 | steps: |
| 15 | - name: Check out code |
| 16 | uses: actions/checkout@v3 |
| 17 | with: |
| 18 | fetch-depth: 0 |
| 19 | |
| 20 | - name: Fetch main branch |
| 21 | run: | |
| 22 | git fetch origin main |
| 23 | git checkout main |
| 24 | git fetch origin $GITHUB_HEAD_REF |
| 25 | git checkout $GITHUB_HEAD_REF -- |
| 26 | |
| 27 | - name: Set up Go |
| 28 | uses: actions/setup-go@v4 |
| 29 | with: |
| 30 | go-version: 1.20.3 |
| 31 | cache: true |
| 32 | |
| 33 | - name: Compile pint |
| 34 | run: make build |
| 35 | |
| 36 | - name: Run pint ci |
| 37 | run: ./pint -c .github/pint/pint.hcl ci |
| 38 | env: |
| 39 | GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 40 | |