Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
chore: update workflow for docker build and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusbegby committed Aug 20, 2023
1 parent c2a7968 commit c361a41
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Push Docker Image on Release

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Login to DockerHub
uses: docker/#-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract release tag name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Build and Push Docker Image
run: |
docker build -t mariusbegby/cadence:${{ env.RELEASE_VERSION }} .
docker push mariusbegby/cadence:${{ env.RELEASE_VERSION }}

0 comments on commit c361a41

Please # to comment.