From 0d85966a1d634c9a5e47c5c2896d818f4fe247ca Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Wed, 5 Oct 2022 09:54:22 -0300 Subject: [PATCH 1/5] feat(deps): go 1.19.2 Signed-off-by: Carlos A Becker --- .github/workflows/build.yml | 6 +++--- .github/workflows/docs.yml | 2 +- .github/workflows/fig.yml | 2 +- .github/workflows/generate.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- www/docs/ci/actions.md | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc73fd2d2ca..cc329c92057 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,14 +26,14 @@ jobs: uses: caarlos0/meta/.github/workflows/govulncheck.yml@main with: cache: true - go-version: '>=1.19.1' + go-version: '>=1.19.2' semgrep: uses: caarlos0/meta/.github/workflows/semgrep.yml@main ruleguard: uses: caarlos0/meta/.github/workflows/ruleguard.yml@main with: cache: true - go-version: '>=1.19.1' + go-version: '>=1.19.2' args: '-disable largeloopcopy' test: runs-on: ubuntu-latest @@ -58,7 +58,7 @@ jobs: mkdir -p $HOME/.cache/snapcraft/stage-packages - uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3 with: - go-version: '>=1.19.1' + go-version: '>=1.19.2' cache: true - uses: sigstore/cosign-installer@v2.7.0 - uses: anchore/sbom-action/download-syft@v0.12.0 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index eec78a7bc55..0ac4df5353e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,7 +23,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3 with: - go-version: '>=1.19.1' + go-version: '>=1.19.2' - run: task docs:build - uses: wjdp/htmltest-action@09118714cd26bef56bd3d0819e4f9b1dce6f60a9 # master with: diff --git a/.github/workflows/fig.yml b/.github/workflows/fig.yml index 83d3e573beb..8e04212f324 100644 --- a/.github/workflows/fig.yml +++ b/.github/workflows/fig.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3 - uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3 with: - go-version: '>=1.19.1' + go-version: '>=1.19.2' cache: true - run: go run . generate-fig-spec >goreleaser.ts - uses: withfig/push-to-fig-autocomplete-action@v1 diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 94610be2def..72491709308 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -24,7 +24,7 @@ jobs: token: ${{ secrets.GH_PAT }} - uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3 with: - go-version: '>=1.19.1' + go-version: '>=1.19.2' cache: true - uses: arduino/setup-task@ca745e18916de727f841ec824ac20a615f1cddea # v1 - run: task docs:generate diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3abb1f0b7f3..d85968f2cbf 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3 with: - go-version: '>=1.19.1' + go-version: '>=1.19.2' - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3 - name: golangci-lint uses: golangci/golangci-lint-action@537aa1903e5d359d0b27dbc19ddd22c5087f3fbc # v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5337ab36078..6c3bd013c8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,7 +63,7 @@ jobs: mkdir -p $HOME/.cache/snapcraft/stage-packages - uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3 with: - go-version: '>=1.19.1' + go-version: '>=1.19.2' cache: true - uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # v3 with: diff --git a/www/docs/ci/actions.md b/www/docs/ci/actions.md index 0cee02f6fa7..0bac2ecfddb 100644 --- a/www/docs/ci/actions.md +++ b/www/docs/ci/actions.md @@ -36,7 +36,7 @@ jobs: - run: git fetch --force --tags - uses: actions/setup-go@v3 with: - go-version: '>=1.19.1' + go-version: '>=1.19.2' cache: true # More assembly might be required: Docker logins, GPG, etc. It all depends # on your needs. From 44137f22bcb9cf1c0c844d980af2c0d2e55e0a02 Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Wed, 5 Oct 2022 10:47:17 -0300 Subject: [PATCH 2/5] chore: always build on main --- .github/workflows/build.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc329c92057..8a942fa0669 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,6 @@ on: push: branches: - 'main' - paths: - - 'go.*' - - '**/*.go' - - 'Taskfile.yml' - - 'Dockerfile' - - '.github/workflows/build.yml' pull_request: paths: - 'go.*' From c35e234f30b6e5599306133765537d7d6f4d65ad Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Wed, 5 Oct 2022 10:47:44 -0300 Subject: [PATCH 3/5] chore: update schema --- www/docs/ci/actions.md | 2 +- www/docs/errors/multiple-tokens.md | 21 +++++++++++++++++++++ www/docs/static/schema-pro.json | 6 ++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/www/docs/ci/actions.md b/www/docs/ci/actions.md index 0bac2ecfddb..0cee02f6fa7 100644 --- a/www/docs/ci/actions.md +++ b/www/docs/ci/actions.md @@ -36,7 +36,7 @@ jobs: - run: git fetch --force --tags - uses: actions/setup-go@v3 with: - go-version: '>=1.19.2' + go-version: '>=1.19.1' cache: true # More assembly might be required: Docker logins, GPG, etc. It all depends # on your needs. diff --git a/www/docs/errors/multiple-tokens.md b/www/docs/errors/multiple-tokens.md index 49dda230398..53392e11f31 100644 --- a/www/docs/errors/multiple-tokens.md +++ b/www/docs/errors/multiple-tokens.md @@ -13,3 +13,24 @@ Learn more at https://goreleaser.com/errors/multiple-tokens In this case, you either unset `GITHUB_TOKEN` or `GITLAB_TOKEN`. You can read more about it in the [SCM docs](/scm/github/). + +This can also happen if you load the tokens from files. +The default paths are: + +- `~/.config/goreleaser/github_token` +- `~/.config/goreleaser/gitlab_token` +- `~/.config/goreleaser/gitea_token` + +If you have more than one of these files, but for a particular project, you want +to force one of them, you can explicitly disable the others by setting them to a +file you know won't exist: + +```yaml + +# .goreleaser.yaml +env_files: + gitlab_token: ~/nope + gitea_token: ~/nope +``` + +This will prevent using both GitLab and Gitea tokens. diff --git a/www/docs/static/schema-pro.json b/www/docs/static/schema-pro.json index 259ec806a38..b9d1b79fc5b 100644 --- a/www/docs/static/schema-pro.json +++ b/www/docs/static/schema-pro.json @@ -71,6 +71,12 @@ }, "type": "array" }, + "backup": { + "items": { + "type": "string" + }, + "type": "array" + }, "rel": { "type": "string" }, From b81d3122942fcaed82926cea104f60be2e523393 Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Wed, 5 Oct 2022 10:51:18 -0300 Subject: [PATCH 4/5] chore: update Signed-off-by: Carlos A Becker --- www/docs/ci/actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/docs/ci/actions.md b/www/docs/ci/actions.md index 0cee02f6fa7..0bac2ecfddb 100644 --- a/www/docs/ci/actions.md +++ b/www/docs/ci/actions.md @@ -36,7 +36,7 @@ jobs: - run: git fetch --force --tags - uses: actions/setup-go@v3 with: - go-version: '>=1.19.1' + go-version: '>=1.19.2' cache: true # More assembly might be required: Docker logins, GPG, etc. It all depends # on your needs. From 913dd75a85a97d603b5163093e0f4362bfbbd29c Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Wed, 5 Oct 2022 11:11:01 -0300 Subject: [PATCH 5/5] fix: revert unwanted change in docker.go refs #3414 --- internal/pipe/docker/docker.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/pipe/docker/docker.go b/internal/pipe/docker/docker.go index c4da6a35e6e..17f39143284 100644 --- a/internal/pipe/docker/docker.go +++ b/internal/pipe/docker/docker.go @@ -154,6 +154,14 @@ func process(ctx *context.Context, docker config.Docker, artifacts []*artifact.A log := log.WithField("image", images[0]) log.Debug("tempdir: " + tmp) + dockerfile, err := tmpl.New(ctx).Apply(docker.Dockerfile) + if err != nil { + return err + } + if err := gio.Copy(dockerfile, filepath.Join(tmp, "Dockerfile")); err != nil { + return fmt.Errorf("failed to copy dockerfile: %w", err) + } + for _, file := range docker.Files { if err := os.MkdirAll(filepath.Join(tmp, filepath.Dir(file)), 0o755); err != nil { return fmt.Errorf("failed to copy extra file '%s': %w", file, err)