mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-27 08:00:52 +08:00
commit
ae22f4477b
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -48,7 +48,7 @@ jobs:
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
if: ${{ github.ref == 'refs/heads/main' && success() && steps.last_release.outputs.tag_name != '' }}
|
||||
if: ${{ github.ref == 'refs/heads/main' && success() }}
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
@ -56,7 +56,7 @@ jobs:
|
||||
##ref: https://docs.docker.com/language/golang/configure-ci-cd/
|
||||
##ref: https://event-driven.io/en/how_to_buid_and_push_docker_image_with_github_actions
|
||||
- name: Build Docker Image
|
||||
if: ${{ github.ref == 'refs/heads/main' && success() && steps.last_release.outputs.tag_name != '' }}
|
||||
if: ${{ github.ref == 'refs/heads/main' && success() }}
|
||||
run: |
|
||||
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/booking-microservices-flight:${{ steps.last_release.outputs.tag_name }} -f "${{ github.workspace }}/src/Services/Flight/Dockerfile" .
|
||||
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/booking-microservices-identity:${{ steps.last_release.outputs.tag_name }} -f "${{ github.workspace }}/src/Services/Identity/Dockerfile" .
|
||||
@ -64,7 +64,7 @@ jobs:
|
||||
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/booking-microservices-booking:${{ steps.last_release.outputs.tag_name }} -f "${{ github.workspace }}/src/Services/Booking/Dockerfile" .
|
||||
|
||||
- name: Publish Docker Image
|
||||
if: ${{ github.ref == 'refs/heads/main' && success() && steps.last_release.outputs.tag_name != '' }}
|
||||
if: ${{ github.ref == 'refs/heads/main' && success() }}
|
||||
run: |
|
||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/booking-microservices-flight:${{ steps.last_release.outputs.tag_name }}
|
||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/booking-microservices-identity:${{ steps.last_release.outputs.tag_name }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user