From e9aff3c9f700dba44a3c4b77c8198be027eee76b Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Wed, 21 Dec 2022 09:19:43 -0800 Subject: [PATCH 1/5] [chore] split goreleaser This attempts to split the prepare/release process using the example recommended here: https://goreleaser.com/customization/partial/. This may reduce the amount of time it takes to build the release and hopefully address disk space constraints. Signed-off-by: Alex Boten --- .github/workflows/release.yaml | 100 +++++++++++++++++++++++++++------ 1 file changed, 83 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3a986582..c3801382 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,9 +5,67 @@ on: tags: ["v*"] jobs: + prepare: + strategy: + matrix: + GOOS: [linux, windows, darwin] + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: sigstore/cosign-installer@v2 + + - uses: docker/setup-qemu-action@v2 + with: + platforms: arm64,ppc64le + + - uses: docker/setup-buildx-action@v2 + + - uses: actions/setup-go@v3 + with: + go-version: '~1.19.4' + check-latest: true + + - name: Generate distribution sources + run: make generate-sources + + - name: Log into Docker.io + run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + + - name: Login to GitHub Package Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - shell: bash + run: | + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + + - id: cache + uses: actions/cache@v3 + with: + path: dist/${{ matrix.GOOS }} + key: ${{ matrix.GOOS }}-${{ env.sha_short }} + + - uses: goreleaser/goreleaser-action@v4 + if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit + with: + version: latest + args: release --rm-dist --split --timeout 2h + env: + GOOS: ${{ matrix.GOOS }} + GITHUB_TOKEN: ${{ secrets.GH_PAT }} + COSIGN_EXPERIMENTAL: true + release: name: Release runs-on: ubuntu-20.04 + needs: prepare permissions: id-token: write @@ -15,33 +73,41 @@ jobs: contents: write steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Install cosign - uses: sigstore/cosign-installer@v2 + - uses: sigstore/cosign-installer@v2 - - name: Install syft - uses: anchore/sbom-action/download-syft@v0.13.1 + - uses: anchore/sbom-action/download-syft@v0.13.1 - - name: Setup QEMU - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-qemu-action@v2 with: platforms: arm64,ppc64le - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v2 + - uses: docker/setup-buildx-action@v2 - - name: Setup Go - uses: actions/setup-go@v3 + - uses: actions/setup-go@v3 with: go-version: '~1.19.4' check-latest: true - - name: Generate distribution sources - run: make generate-sources + # copy the caches from prepare + - shell: bash + run: | + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + - uses: actions/cache@v3 + with: + path: dist/linux + key: linux-${{ env.sha_short }} + - uses: actions/cache@v3 + with: + path: dist/darwin + key: darwin-${{ env.sha_short }} + - uses: actions/cache@v3 + with: + path: dist/windows + key: windows-${{ env.sha_short }} - name: Log into Docker.io run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin @@ -53,11 +119,11 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 + - uses: goreleaser/goreleaser-action@v4 + if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit with: version: latest - args: release --rm-dist --timeout 2h + args: continue --merge --rm-dist --timeout 2h env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COSIGN_EXPERIMENTAL: true From 5fbc5b52523bbba614019110ffbab90008db2414 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Wed, 21 Dec 2022 09:40:42 -0800 Subject: [PATCH 2/5] update docker login Signed-off-by: Alex Boten --- .github/workflows/release.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c3801382..4e5f4123 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,7 +33,9 @@ jobs: run: make generate-sources - name: Log into Docker.io - run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry uses: docker/login-action@v2 From e29ed3210a9392fc392abc3c2cfa1fac1c385fe7 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Wed, 21 Dec 2022 09:43:08 -0800 Subject: [PATCH 3/5] update docker login Signed-off-by: Alex Boten --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4e5f4123..f66b35f9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,6 +33,7 @@ jobs: run: make generate-sources - name: Log into Docker.io + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} From 09b5718afe3e786ad8340f670ae3d878b0c66698 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Wed, 21 Dec 2022 09:51:08 -0800 Subject: [PATCH 4/5] use pro distro Signed-off-by: Alex Boten --- .github/workflows/release.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f66b35f9..c5eaaa77 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -58,12 +58,14 @@ jobs: - uses: goreleaser/goreleaser-action@v4 if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit with: + distribution: goreleaser-pro version: latest args: release --rm-dist --split --timeout 2h env: GOOS: ${{ matrix.GOOS }} GITHUB_TOKEN: ${{ secrets.GH_PAT }} COSIGN_EXPERIMENTAL: true + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} release: name: Release @@ -125,8 +127,10 @@ jobs: - uses: goreleaser/goreleaser-action@v4 if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit with: + distribution: goreleaser-pro version: latest args: continue --merge --rm-dist --timeout 2h env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COSIGN_EXPERIMENTAL: true + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} From 74ad7d8fdf1a947e1d6dce8fb984efd958038fa5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 19:23:58 +0000 Subject: [PATCH 5/5] Add renovate.json --- renovate.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..39a2b6e9 --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base" + ] +}