diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a81f4f..d8f9f0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,12 +27,18 @@ jobs: run: | git tag ${{ steps.generate-version.outputs.version }} git push --tags "https://codacy:${{ secrets.GITHUB_TOKEN }}@github.com/codacy/pulse-event-cli" + - name: Build docker image + run: docker build -t "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}" . - name: "Login to Docker Hub" uses: docker/login-action@v1.12.0 with: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASS }} - - name: Release + - name: Push docker image + run: | + docker push "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}" + docker push "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}:latest" + - name: Push binaries to GitHub uses: goreleaser/goreleaser-action@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 2b18f69..d717aca 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -19,11 +19,3 @@ changelog: exclude: - "^docs:" - "^test:" -dockers_v2: - - images: - - "codacy/pulse-event-cli" - tags: - - "{{ .Tag }}" - - "v{{ .Major}}" - - "v{{ .Major }}.{{ .Minor }}" - - "latest" diff --git a/Dockerfile b/Dockerfile index f09bd94..841e64f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,6 @@ FROM alpine:latest AS alpine # We need git to automatically get the changes of a deployment RUN apk add -U --no-cache ca-certificates git -# See https://goreleaser.com/customization/dockers_v2/#how-it-works -ARG TARGETPLATFORM - WORKDIR /workdir -COPY $TARGETPLATFORM/pulse-event-cli /bin/ +COPY pulse-event-cli /bin/ ENTRYPOINT ["pulse-event-cli"]