mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-28 16:52:47 +08:00
.
This commit is contained in:
parent
38cbb42bc4
commit
5de25a15c9
22
.github/workflows/build-publish.yml
vendored
22
.github/workflows/build-publish.yml
vendored
@ -19,6 +19,11 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# setup Docker buld action
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
@ -32,10 +37,15 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build image and push to Docker Hub and GitHub Container Registry
|
||||||
- name: Build image
|
uses: docker/build-push-action@v2
|
||||||
run: docker build -t meysamh66/booking-microservices-flight:latest -f ./src/Services/Flight/Dockerfile .
|
with:
|
||||||
|
# relative path to the place where source code with Dockerfile is located
|
||||||
- name: Publish image
|
context: ./src/Services/Flight/Dockerfile
|
||||||
run: docker push meysamh66/booking-microservices-flight:latest
|
# Note: tags has to be all lower-case
|
||||||
|
tags: |
|
||||||
|
meysamh66/booking-microservices-flight:latest
|
||||||
|
ghcr.io/meysamhadeli/booking-microservices/flight:latest
|
||||||
|
# build on feature branches, push only on develop branch
|
||||||
|
push: ${{ github.ref == 'refs/heads/develop' }}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user