mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-11-22 04:19:47 -05:00
chore(cd): publish the tagged docker image
This commit is contained in:
parent
1c596ee760
commit
6019e77026
1 changed files with 26 additions and 0 deletions
26
.github/workflows/cd.yml
vendored
26
.github/workflows/cd.yml
vendored
|
@ -64,3 +64,29 @@ jobs:
|
||||||
with:
|
with:
|
||||||
command: publish
|
command: publish
|
||||||
args: --locked --token ${{ secrets.CARGO_TOKEN }}
|
args: --locked --token ${{ secrets.CARGO_TOKEN }}
|
||||||
|
|
||||||
|
publish-docker:
|
||||||
|
name: Publish the Docker image
|
||||||
|
needs: publish-github
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@main
|
||||||
|
- name: Set the release version
|
||||||
|
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
|
||||||
|
- name: Build
|
||||||
|
run: docker build -t rustypaste .
|
||||||
|
- name: Tag
|
||||||
|
run: |
|
||||||
|
docker tag rustypaste orhunp/rustypaste:${{ env.RELEASE_VERSION }}
|
||||||
|
docker tag rustypaste docker.pkg.github.com/orhun/rustypaste/rustypaste:${{ env.RELEASE_VERSION }}
|
||||||
|
- name: Login (Docker Hub)
|
||||||
|
run: echo ${{ secrets.DOCKER_TOKEN }} |
|
||||||
|
docker login -u orhunp --password-stdin
|
||||||
|
- name: Push (Docker Hub)
|
||||||
|
run: docker push orhunp/rustypaste:${{ 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/rustypaste/rustypaste:${{ env.RELEASE_VERSION }}
|
||||||
|
|
Loading…
Reference in a new issue