From 7756266b17f3c3ba55f5d00f8e55aea0a3a68ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sat, 2 Oct 2021 00:08:08 +0300 Subject: [PATCH] chore(docker): use docker.yml workflow for CI/CD --- .github/workflows/cd.yml | 26 -------------------------- .github/workflows/docker.yml | 3 +++ 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 59034dd385..310cf6d7c8 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -131,32 +131,6 @@ jobs: release_name: "Release v${{ env.RELEASE_VERSION }}" body: "${{ needs.generate-changelog.outputs.release_body }}" - publish-docker: - name: Publish the Docker image - needs: publish-github - runs-on: ubuntu-20.04 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set the release version - run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV - - name: Build - run: docker build -t git-cliff . - - name: Tag - run: | - docker tag git-cliff orhunp/git-cliff:${{ env.RELEASE_VERSION }} - docker tag git-cliff docker.pkg.github.com/orhun/git-cliff/git-cliff:${{ env.RELEASE_VERSION }} - - name: Login (Docker Hub) - run: echo ${{ secrets.DOCKERHUB_PASS }} | - docker login -u orhunp --password-stdin - - name: Push (Docker Hub) - run: docker push orhunp/git-cliff:${{ env.RELEASE_VERSION }} - - name: Login (Package Registry) - run: echo ${{ secrets.GITHUB_TOKEN }} | - docker login -u orhun docker.pkg.github.com --password-stdin - - name: Push (Package Registry) - run: docker push docker.pkg.github.com/orhun/git-cliff/git-cliff:${{ env.RELEASE_VERSION }} - publish-crates-io: name: Publish on crates.io needs: publish-github diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f1b404ea6f..dc0e5355c6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,6 +4,8 @@ on: push: branches: - main + tags: + - "v*.*.*" pull_request: branches: - main @@ -29,6 +31,7 @@ jobs: type=ref,event=pr type=sha type=raw,value=latest + type=semver,pattern={{version}} - name: Set up Docker Buildx id: buildx