Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 11, 01:00 UTC
| 1 | name: Lint |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - master |
| 7 | - 2.* |
| 8 | pull_request: |
| 9 | branches: |
| 10 | - master |
| 11 | - 2.* |
| 12 | |
| 13 | permissions: |
| 14 | contents: read |
| 15 | |
| 16 | env: |
| 17 | # https://github.com/actions/setup-go/issues/491 |
| 18 | GOTOOLCHAIN: local |
| 19 | |
| 20 | jobs: |
| 21 | # From https://github.com/golangci/golangci-lint-action |
| 22 | golangci: |
| 23 | permissions: |
| 24 | contents: read # for actions/checkout to fetch code |
| 25 | pull-requests: read # for golangci/golangci-lint-action to fetch pull requests |
| 26 | name: lint |
| 27 | strategy: |
| 28 | matrix: |
| 29 | os: |
| 30 | - linux |
| 31 | - mac |
| 32 | - windows |
| 33 | |
| 34 | include: |
| 35 | - os: linux |
| 36 | OS_LABEL: ubuntu-latest |
| 37 | |
| 38 | - os: mac |
| 39 | OS_LABEL: macos-latest |
| 40 | |
| 41 | - os: windows |
| 42 | OS_LABEL: windows-latest |
| 43 | |
| 44 | runs-on: ${{ matrix.OS_LABEL }} |
| 45 | |
| 46 | steps: |
| 47 | - name: Harden the runner (Audit all outbound calls) |
| 48 | uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3 |
| 49 | with: |
| 50 | egress-policy: audit |
| 51 | |
| 52 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 53 | - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 |
| 54 | with: |
| 55 | go-version: '~1.27' |
| 56 | check-latest: true |
| 57 | |
| 58 | - name: golangci-lint |
| 59 | uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 |
| 60 | with: |
| 61 | version: latest |
| 62 | |
| 63 | # Windows times out frequently after about 5m50s if we don't set a longer timeout. |
| 64 | args: --timeout 10m |
| 65 | |
| 66 | # Optional: show only new issues if it's a pull request. The default value is `false`. |
| 67 | # only-new-issues: true |
| 68 | |
| 69 | govulncheck: |
| 70 | permissions: |
| 71 | contents: read |
| 72 | pull-requests: read |
| 73 | runs-on: ubuntu-latest |
| 74 | steps: |
| 75 | - name: Harden the runner (Audit all outbound calls) |
| 76 | uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3 |
| 77 | with: |
| 78 | egress-policy: audit |
| 79 | |
| 80 | - name: govulncheck |
| 81 | uses: golang/govulncheck-action@032d45514ae346b1db93c04b0c90b841c370344f # v1.1.0 |
| 82 | with: |
| 83 | go-version-input: '~1.27.0' |
| 84 | check-latest: true |
| 85 | |
| 86 | dependency-review: |
| 87 | runs-on: ubuntu-latest |
| 88 | permissions: |
| 89 | contents: read |
| 90 | pull-requests: write |
| 91 | steps: |
| 92 | - name: Harden the runner (Audit all outbound calls) |
| 93 | uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3 |
| 94 | with: |
| 95 | egress-policy: audit |
| 96 | |
| 97 | - name: 'Checkout Repository' |
| 98 | uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 99 | - name: 'Dependency Review' |
| 100 | uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0 |
| 101 | with: |
| 102 | comment-summary-in-pr: on-failure |
| 103 | # https://github.com/actions/dependency-review-action/issues/430#issuecomment-1468975566 |
| 104 | base-ref: ${{ github.event.pull_request.base.sha || 'master' }} |
| 105 | head-ref: ${{ github.event.pull_request.head.sha || github.ref }} |