Skip to content

Commit

Permalink
Both latest and version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jvik committed Dec 22, 2024
1 parent a944d81 commit 724048e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment: prod

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

- name: Build Docker Image
run: docker build -t jvik/elaway-gateway-api:${{ github.event.release.tag_name }} .
- name: Build and Tag Docker Image
run: |
docker build -t jvik/elaway-gateway-api:${{ github.event.release.tag_name }} .
docker tag jvik/elaway-gateway-api:${{ github.event.release.tag_name }} jvik/elaway-gateway-api:latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: jvik
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Push Docker Image
run: docker push jvik/elaway-gateway-api:${{ github.event.release.tag_name }}
- name: Push to Docker Hub
run: |
docker push jvik/elaway-gateway-api:${{ github.event.release.tag_name }}
docker push jvik/elaway-gateway-api:latest

0 comments on commit 724048e

Please sign in to comment.