diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6e544d6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = tab +insert_final_newline = true +tab_width = unset +trim_trailing_whitespace = true + +[*.{md,yml,yaml}] +indent_size = 2 +indent_style = space diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e0871f9..634debd 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,32 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/" # Location of package manifests + + - package-ecosystem: gomod + directory: / + schedule: + interval: weekly + cooldown: + default-days: 7 + groups: + all: + patterns: + - "*" + update-types: + - minor + - patch + + - package-ecosystem: github-actions + directory: / schedule: - interval: "weekly" + interval: weekly + cooldown: + default-days: 7 + groups: + all: + patterns: + - "*" + update-types: + - minor + - patch diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f83f1e9..8e6accc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,18 +1,32 @@ name: CI -on: [push, pull_request] +on: + push: + tags-ignore: + - '**' + branches: + - main + pull_request: + types: + - opened + - synchronize + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: test: name: Test strategy: + fail-fast: false matrix: go: ['1.14', '1.15', '1.16', '1.21', '1.22', '1.23'] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: go-version: ${{ matrix.go }} - name: Test diff --git a/.github/workflows/code-scan-cron.yml b/.github/workflows/code-scan-cron.yml index 891bda8..9eeec7b 100644 --- a/.github/workflows/code-scan-cron.yml +++ b/.github/workflows/code-scan-cron.yml @@ -12,3 +12,6 @@ jobs: security-events: write uses: smallstep/workflows/.github/workflows/code-scan.yml@main secrets: inherit + with: + codeql-build-mode: manual # tell codeql we'll build; skips autobuild's Makefile heuristic + codeql-build-cmd: go build ./... diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 471eeda..6954835 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1.1.1 + uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Enable auto-merge for Dependabot PRs diff --git a/README.md b/README.md index 9d94e65..32334c5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ import ( "fmt" "os" - "github.com/smallstep/pkcs7" + "github.com/smallstep/pkcs7" ) func SignAndDetach(content []byte, cert *x509.Certificate, privkey *rsa.PrivateKey) (signed []byte, err error) {