diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b686ee6..a7e75bb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,27 +5,16 @@ on: [push, pull_request] permissions: contents: read -jobs: - setup: - runs-on: ubuntu-latest - steps: - - name: Cancel previous - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1 +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} +jobs: tests: - strategy: - matrix: - go-version: [1.x, 1.22.x] - platform: [ubuntu-latest] - include: - - go-version: 1.x - platform: ubuntu-latest - update-coverage: true - runs-on: ${{ matrix.platform }} - needs: [setup] + runs-on: ubuntu-latest services: ctfd: - image: ctfd/ctfd:3.6.1@sha256:182ad5858b5a89d21b184692c1dacab9044cb283fc5bc78663c44c97b3153cd5 + image: ctfd/ctfd:3.7.0@sha256:e4e886aa8f1051eeddcabe2115bc9a5f380be2b54034d5a119c44b177d6b8c57 ports: - 8000:8000 steps: @@ -35,7 +24,7 @@ jobs: - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ${{ matrix.go-version }} + go-version-file: go.mod - name: Cache go modules uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 @@ -73,19 +62,17 @@ jobs: CTFD_URL: http://localhost:8000 - name: Upload coverage to Coveralls - if: ${{ matrix.update-coverage }} uses: shogo82148/actions-goveralls@785c9d68212c91196d3994652647f8721918ba11 # v1.9.0 with: path-to-profile: cov.out go-lint: runs-on: ubuntu-latest - needs: [setup] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: 1.22.x + go-version-file: go.mod - name: go-lint uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0 diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml index 9dc4554..670a074 100644 --- a/.github/workflows/codeql-analysis.yaml +++ b/.github/workflows/codeql-analysis.yaml @@ -32,7 +32,6 @@ jobs: - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version-file: 'go.mod' - cache: true - name: Initialize CodeQL uses: github/codeql-action/init@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5 diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml index ab7ec6b..857ad4f 100644 --- a/.github/workflows/goreleaser.yaml +++ b/.github/workflows/goreleaser.yaml @@ -22,7 +22,6 @@ jobs: - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version-file: 'go.mod' - cache: true - name: Install Syft uses: anchore/sbom-action/download-syft@b6a39da80722a2cb0ef5d197531764a89b5d48c3 # v0.15.8