Skip to content

Commit

Permalink
chore(docker): use docker.yml workflow for CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Oct 1, 2021
1 parent 2950a41 commit 7756266
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
branches:
- main
Expand All @@ -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
Expand Down

0 comments on commit 7756266

Please sign in to comment.