mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-18 09:52:11 +08:00
.
This commit is contained in:
parent
26b9429df1
commit
33be997855
51
.github/workflows/build-publish-docker.yml
vendored
51
.github/workflows/build-publish-docker.yml
vendored
@ -3,6 +3,8 @@ name: build-publish-docker
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ develop ]
|
branches: [ develop ]
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -12,11 +14,18 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- id: version
|
- name: Docker meta
|
||||||
uses: battila7/get-version-action@v2
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: ghcr.io/thedatabaseme/hello-world
|
||||||
|
flavor: latest=true
|
||||||
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@ -24,17 +33,27 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
- name: Build image
|
- name: Build and push
|
||||||
run: |
|
uses: docker/build-push-action@v3
|
||||||
docker build -t meysamh66/booking-microservices-flight:${{ steps.version.outputs.version }} -f "${{ github.workspace }}/src/Services/Flight/Dockerfile" .
|
with:
|
||||||
docker build -t meysamh66/booking-microservices-identity:${{ steps.version.outputs.version }} -f "${{ github.workspace }}/src/Services/Identity/Dockerfile" .
|
context: .
|
||||||
docker build -t meysamh66/booking-microservices-passenger:${{ steps.version.outputs.version }} -f "${{ github.workspace }}/src/Services/Passenger/Dockerfile" .
|
file: ./src/Services/Flight/Dockerfile
|
||||||
docker build -t meysamh66/booking-microservices-booking:${{ steps.version.outputs.version }} -f "${{ github.workspace }}/src/Services/Booking/Dockerfile" .
|
push: ${{ github.ref_type == 'tag' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
- name: Publish image
|
|
||||||
run: |
|
# - name: Build image
|
||||||
docker push meysamh66/booking-microservices-flight:${{ steps.version.outputs.version }}
|
# run: |
|
||||||
docker push meysamh66/booking-microservices-identity:${{ steps.version.outputs.version }}
|
# docker build -t meysamh66/booking-microservices-flight:${{ steps.version.outputs.version }} -f "${{ github.workspace }}/src/Services/Flight/Dockerfile" .
|
||||||
docker push meysamh66/booking-microservices-passenger:${{ steps.version.outputs.version }}
|
# docker build -t meysamh66/booking-microservices-identity:${{ steps.version.outputs.version }} -f "${{ github.workspace }}/src/Services/Identity/Dockerfile" .
|
||||||
docker push meysamh66/booking-microservices-booking:${{ steps.version.outputs.version }}
|
# docker build -t meysamh66/booking-microservices-passenger:${{ steps.version.outputs.version }} -f "${{ github.workspace }}/src/Services/Passenger/Dockerfile" .
|
||||||
|
# docker build -t meysamh66/booking-microservices-booking:${{ steps.version.outputs.version }} -f "${{ github.workspace }}/src/Services/Booking/Dockerfile" .
|
||||||
|
#
|
||||||
|
# - name: Publish image
|
||||||
|
# run: |
|
||||||
|
# docker push meysamh66/booking-microservices-flight:${{ steps.version.outputs.version }}
|
||||||
|
# docker push meysamh66/booking-microservices-identity:${{ steps.version.outputs.version }}
|
||||||
|
# docker push meysamh66/booking-microservices-passenger:${{ steps.version.outputs.version }}
|
||||||
|
# docker push meysamh66/booking-microservices-booking:${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user