From fe295d9dcdbeabcc0f8968eccc8c4920d4639689 Mon Sep 17 00:00:00 2001 From: Mateusz Szostok Date: Fri, 17 Dec 2021 09:57:15 +0100 Subject: [PATCH] Fix releasing CLIs pipeline --- .github/workflows/branch-build.yaml | 16 ++++++++-------- .github/workflows/make-release.yaml | 2 +- .github/workflows/pr-build.yaml | 2 +- .github/workflows/recreate_cluster.yaml | 2 +- .goreleaser.latest.yml | 7 +++++++ 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/branch-build.yaml b/.github/workflows/branch-build.yaml index d986404ac..c1db829ce 100644 --- a/.github/workflows/branch-build.yaml +++ b/.github/workflows/branch-build.yaml @@ -22,7 +22,6 @@ on: jobs: - release-cli: name: Release the latest Capact CLIs runs-on: ubuntu-latest @@ -53,11 +52,9 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - name: upx version - run: upx -V - - name: Install upx - run: sudo apt-get update -y - - name: Install upx + - name: Log into registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Install upx 3.96 run: | # Install UPX wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz @@ -67,10 +64,13 @@ jobs: ./upx-3.96-amd64_linux/upx -V mv ./upx-3.96-amd64_linux/upx /usr/local/bin/upx upx -V - - name: upx version - run: upx -V - name: Set up GoReleaser run: go install github.com/goreleaser/goreleaser@v1.1.0 + - name: Set up GCS + uses: google-github-actions/setup-gcloud@master + with: + service_account_key: ${{ secrets.CAPACT_GCS_CREDS }} + export_default_credentials: true - name: Release latest CLI run: | make release-latest-binaries diff --git a/.github/workflows/make-release.yaml b/.github/workflows/make-release.yaml index 50c6abf09..9a306f828 100644 --- a/.github/workflows/make-release.yaml +++ b/.github/workflows/make-release.yaml @@ -42,7 +42,7 @@ jobs: with: go-version: ${{env.GO_VERSION}} - name: Set up GoReleaser - run: go install github.com/goreleaser/goreleaser@v0.173.2 + run: go install github.com/goreleaser/goreleaser@v1.1.0 - name: Set up GCS uses: google-github-actions/setup-gcloud@master with: diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 10bb9a377..cb035cc52 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -389,7 +389,7 @@ jobs: with: go-version: ${{env.GO_VERSION}} - name: Set up GoReleaser - run: go install github.com/goreleaser/goreleaser@v0.173.2 + run: go install github.com/goreleaser/goreleaser@v1.1.0 - run: make build-tool-cli - name: Share Capact CLI for integration tests bootstrapping uses: actions/upload-artifact@v2 diff --git a/.github/workflows/recreate_cluster.yaml b/.github/workflows/recreate_cluster.yaml index 925d6fded..eb9569a7e 100644 --- a/.github/workflows/recreate_cluster.yaml +++ b/.github/workflows/recreate_cluster.yaml @@ -52,7 +52,7 @@ jobs: with: go-version: ${{env.GO_VERSION}} - name: Set up GoReleaser - run: go install github.com/goreleaser/goreleaser@v0.173.2 + run: go install github.com/goreleaser/goreleaser@v1.1.0 - name: Delete old cluster env: OLD_CLUSTER_NAME: ${{ github.event.inputs.oldClusterToDelete }} diff --git a/.goreleaser.latest.yml b/.goreleaser.latest.yml index 9f313cee1..80528fe95 100644 --- a/.goreleaser.latest.yml +++ b/.goreleaser.latest.yml @@ -28,6 +28,13 @@ archives: - format: binary name_template: '{{ .Binary }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}' +dockers: + - dockerfile: Dockerfile.cli + ids: + - capact + image_templates: + - "ghcr.io/mszostok/tools/capact-cli:latest" + checksum: name_template: 'checksums.txt'