Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
m-GDEV committed Nov 13, 2024
2 parents 915b133 + 48d2056 commit 9d1435e
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 20 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/BuildAndPushApiDockerImage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish WardrobeManager.Api Docker image

on:
release:
branches: ["master"]

env:
IMAGE_NAME: wardrobemanager-api

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: docker/WardrobeManager.Api/Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }} , ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest
36 changes: 36 additions & 0 deletions .github/workflows/BuildAndPushPresentationDockerImage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish WardrobeManager.Presentation Docker image

on:
release:
branches: ["master"]

env:
IMAGE_NAME: wardrobemanager-presentation

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: docker/WardrobeManager.Presentation/Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }} , ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest
20 changes: 0 additions & 20 deletions .github/workflows/docker-image.yml

This file was deleted.

0 comments on commit 9d1435e

Please sign in to comment.