Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into windows
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Apr 10, 2023
2 parents a0ba9e7 + ffefd6c commit 40f9d99
Show file tree
Hide file tree
Showing 183 changed files with 4,170 additions and 2,725 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,11 @@ permissions:
jobs:
govulncheck:
uses: caarlos0/meta/.github/workflows/govulncheck.yml@main
with:
cache: true
go-version: '>=1.20.1'
semgrep:
uses: caarlos0/meta/.github/workflows/semgrep.yml@main
ruleguard:
uses: caarlos0/meta/.github/workflows/ruleguard.yml@main
with:
cache: true
go-version: '>=1.20.1'
args: '-disable largeloopcopy'
test:
strategy:
Expand All @@ -37,7 +32,7 @@ jobs:
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
with:
fetch-depth: 0
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
Expand All @@ -46,7 +41,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2
if: matrix.os == 'ubuntu-latest'
- uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2
- uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2
- name: setup-snapcraft
if: matrix.os == 'ubuntu-latest'
# FIXME: the mkdirs are a hack for https://github.com/goreleaser/goreleaser/issues/1715
Expand All @@ -55,10 +50,9 @@ jobs:
sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft
mkdir -p $HOME/.cache/snapcraft/download
mkdir -p $HOME/.cache/snapcraft/stage-packages
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4
with:
go-version: '>=1.20.1'
cache: true
go-version: stable
- uses: sigstore/cosign-installer@v3.0.1
- uses: anchore/sbom-action/download-syft@v0.13.3
if: matrix.os == 'ubuntu-latest'
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ jobs:
contents: read

steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4
with:
go-version: '>=1.20.1'
cache: true
- uses: github/codeql-action/init@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
- uses: github/codeql-action/autobuild@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
- uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
go-version: stable
- uses: github/codeql-action/init@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
- uses: github/codeql-action/autobuild@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
- uses: github/codeql-action/analyze@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
2 changes: 1 addition & 1 deletion .github/workflows/depsreview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
- uses: actions/dependency-review-action@v3
with:
allow-licenses: BSD-2-Clause, BSD-3-Clause, MIT, Apache-2.0, MPL-2.0
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
htmltest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4
with:
go-version: '>=1.20.1'
go-version: stable
- run: task docs:build
- uses: wjdp/htmltest-action@09118714cd26bef56bd3d0819e4f9b1dce6f60a9 # master
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
fig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4
with:
go-version: '>=1.20.1'
go-version: stable
cache: true
- run: go run . generate-fig-spec >goreleaser.ts
- uses: withfig/push-to-fig-autocomplete-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
with:
token: ${{ secrets.GH_PAT }}
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
with:
token: ${{ secrets.GH_PAT }}
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4
with:
go-version: '>=1.20.1'
go-version: stable
cache: true
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
- run: task docs:generate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/grype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
contents: read

steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
- uses: anchore/scan-action@v3
with:
path: "."
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4
with:
go-version: '>=1.20.1'
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
go-version: stable
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3
with:
skip-go-installation: true
args: --timeout=5m
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ jobs:
matrix:
format: [ deb, rpm, apk ]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
with:
fetch-depth: 0
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: |
./dist/*.deb
Expand All @@ -70,27 +70,26 @@ jobs:
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
with:
fetch-depth: 0
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2
- uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2
- uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2
- name: setup-snapcraft
# FIXME: the mkdirs are a hack for https://github.com/goreleaser/goreleaser/issues/1715
run: |
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft
mkdir -p $HOME/.cache/snapcraft/download
mkdir -p $HOME/.cache/snapcraft/stage-packages
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4
with:
go-version: '>=1.20.1'
cache: true
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
go-version: stable
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: |
./dist/*.deb
Expand Down
10 changes: 6 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ changelog:
- title: 'New Features'
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 100
- title: 'Security updates'
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
order: 150
- title: 'Bug fixes'
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 200
Expand Down Expand Up @@ -211,6 +214,7 @@ scoop:
bucket:
owner: goreleaser
name: scoop-bucket
folder: bucket
homepage: https://goreleaser.com
description: Deliver Go binaries as fast and easily as possible
license: MIT
Expand Down Expand Up @@ -279,8 +283,6 @@ sboms:

signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: '${artifact}.pem'
output: true
artifacts: checksum
Expand All @@ -289,16 +291,16 @@ signs:
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
- --yes

docker_signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
artifacts: manifests
output: true
args:
- 'sign'
- '${artifact}@${digest}'
- --yes

publishers:
- name: fury.io
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.1-alpine@sha256:87d0a3309b34e2ca732efd69fb899d3c420d3382370fd6e7e6d2cb5c930f27f9
FROM golang:1.20.3-alpine@sha256:08e9c086194875334d606765bd60aa064abd3c215abfbcf5737619110d48d114

RUN apk add --no-cache bash \
curl \
Expand Down
1 change: 1 addition & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Here's a running list of some organizations using GoReleaser[^1]:
1. [IRON Security](https://iron.security)
1. [Koordinator](https://koordinator.sh)
1. [KSOC](https://www.ksoc.com/)
1. [KusionStack](https://kusionstack.io/)
1. [Mercure](https://mercure.rocks/)
1. [Meroxa](https://meroxa.com/)
1. [Microsoft](https://microsoft.com)
Expand Down
2 changes: 1 addition & 1 deletion cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func setupPipeline(ctx *context.Context, options buildOpts) []pipeline.Piper {

func setupBuildContext(ctx *context.Context, options buildOpts) error {
ctx.Deprecated = options.deprecated // test only
ctx.Parallelism = runtime.NumCPU()
ctx.Parallelism = runtime.GOMAXPROCS(0)
if options.parallelism > 0 {
ctx.Parallelism = options.parallelism
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/check_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"os"
"testing"

"github.com/stretchr/testify/require"
Expand All @@ -15,7 +16,7 @@ func TestCheckConfig(t *testing.T) {
func TestCheckConfigThatDoesNotExist(t *testing.T) {
cmd := newCheckCmd()
cmd.cmd.SetArgs([]string{"-f", "testdata/nope.yml"})
require.EqualError(t, cmd.cmd.Execute(), "open testdata/nope.yml: no such file or directory")
require.ErrorIs(t, cmd.cmd.Execute(), os.ErrNotExist)
}

func TestCheckConfigUnmarshalError(t *testing.T) {
Expand Down

0 comments on commit 40f9d99

Please sign in to comment.