diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8cd4ada..5bace7a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,26 @@ updates: schedule: interval: "weekly" target-branch: "devel" + cooldown: + default-days: 7 + commit-message: + prefix: "chore" + include: "scope" + labels: + - "Maintenance" + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + target-branch: "devel" + cooldown: + default-days: 7 + groups: + github-actions: + patterns: + - "*" commit-message: prefix: "chore" include: "scope" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 352a51b..0af0818 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -15,14 +15,16 @@ on: schedule: - cron: '0 0 * * 6' +permissions: {} + jobs: analyze: name: Analyze runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} permissions: - actions: read - contents: read - security-events: write + actions: read # read workflow run metadata (needed on private repos) + contents: read # check out the repository + security-events: write # upload CodeQL results to code scanning strategy: fail-fast: false @@ -35,11 +37,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -53,7 +57,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -66,6 +70,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fb564da..2b9f4cd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -9,17 +9,21 @@ on: pull_request: branches: [ "main", "devel" ] +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: - go-version: 1.25 go-version-file: 'go.mod' - name: Build diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index e98b15c..c73931c 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -16,12 +16,15 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v6 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - go-version: 1.25 - - uses: actions/checkout@v6 + persist-credentials: false + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version-file: 'go.mod' + cache: false - name: golangci-lint - uses: golangci/golangci-lint-action@v9 + uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version version: v2.11.3 diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index 8f2b4c0..6441861 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -6,26 +6,32 @@ on: - '*' workflow_dispatch: +permissions: {} + jobs: release: runs-on: ubuntu-latest + permissions: + contents: write # create the GitHub release and upload assets steps: - name: "Check out code" - uses: actions/checkout@v6 - with: + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: fetch-depth: 0 + persist-credentials: false - name: "Set up Go" - uses: actions/setup-go@v6 - with: - go-version: 1.25 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version-file: 'go.mod' + cache: false - name: "Create release on GitHub" timeout-minutes: 10 - uses: goreleaser/goreleaser-action@v6 - with: + uses: goreleaser/goreleaser-action@a4f02ab5355a589de60d917a659ce617ed19b3de # v7.3.0 + with: args: "release --clean" - version: latest + version: '~> v2' workdir: . env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml index 01dee6e..44d88cc 100644 --- a/.github/workflows/release-test.yml +++ b/.github/workflows/release-test.yml @@ -7,24 +7,29 @@ on: - '**.mod' workflow_dispatch: +permissions: + contents: read + jobs: release-test: runs-on: ubuntu-latest steps: - name: "Check out code" - uses: actions/checkout@v6 - with: + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: fetch-depth: 0 + persist-credentials: false - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: - go-version: 1.25 - + go-version-file: 'go.mod' + cache: false + - name: release test - uses: goreleaser/goreleaser-action@v6 + uses: goreleaser/goreleaser-action@a4f02ab5355a589de60d917a659ce617ed19b3de # v7.3.0 with: args: "release --clean --snapshot" - version: latest + version: '~> v2' env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file