mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-05-03 03:11:51 +08:00
.
This commit is contained in:
parent
4ea076edb7
commit
1bca448b53
30
.github/workflows/build-publish.yml
vendored
30
.github/workflows/build-publish.yml
vendored
@ -19,11 +19,6 @@ 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:
|
||||||
@ -33,19 +28,20 @@ jobs:
|
|||||||
- name: Login to Github Packages
|
- name: Login to Github Packages
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ${{ env.REGISTRY }}
|
||||||
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
|
|
||||||
uses: docker/build-push-action@v2
|
- name: Build image
|
||||||
with:
|
run: |
|
||||||
# relative path to the place where source code with Dockerfile is located
|
# docker build -t meysamh66/booking-microservices/flight:latest -f ./src/Services/Flight/Dockerfile .
|
||||||
context: ./src/Services/Flight
|
docker build . -t ${{ env.REGISTRY }}/${{ github.repository }}/flight:latest -f "${{ github.workspace }}/src/Services/Catalogs/Flight/Dockerfile ."
|
||||||
# Note: tags has to be all lower-case
|
|
||||||
tags: |
|
|
||||||
meysamh66/booking-microservices-flight:latest
|
- name: Publish image
|
||||||
ghcr.io/meysamhadeli/booking-microservices/flight:latest
|
run: |
|
||||||
# build on feature branches, push only on develop branch
|
docker push "${{ env.REGISTRY }}/${{ github.repository }}/flight:latest}}"
|
||||||
push: ${{ github.ref == 'refs/heads/develop' }}
|
# docker push meysamh66/booking-microservices/flight:latest
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user