This commit is contained in:
meysamhadeli 2023-01-25 02:42:03 +03:30
parent 5c62c92454
commit 75afd0d062

View File

@ -15,10 +15,12 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Get Latest Tag - name: Semantic Release
run: | uses: semantic-release/git-semantic-release-action@v3
export VERSION=$(git describe --abbrev=0 --tags) env:
echo "Latest Tag: $VERSION" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version_variable: 'TAG_NAME'
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v2 uses: docker/login-action@v2
@ -28,15 +30,15 @@ jobs:
- name: Build image - name: Build image
run: | run: |
docker build -t meysamh66/booking-microservices-flight:latest -f "${{ github.workspace }}/src/Services/Flight/Dockerfile" . docker build -t meysamh66/booking-microservices-flight:${{ env.TAG_NAME }} -f "${{ github.workspace }}/src/Services/Flight/Dockerfile" .
docker build -t meysamh66/booking-microservices-identity:latest -f "${{ github.workspace }}/src/Services/Identity/Dockerfile" . docker build -t meysamh66/booking-microservices-identity:${{ env.TAG_NAME }} -f "${{ github.workspace }}/src/Services/Identity/Dockerfile" .
docker build -t meysamh66/booking-microservices-passenger:latest -f "${{ github.workspace }}/src/Services/Passenger/Dockerfile" . docker build -t meysamh66/booking-microservices-passenger:${{ env.TAG_NAME }} -f "${{ github.workspace }}/src/Services/Passenger/Dockerfile" .
docker build -t meysamh66/booking-microservices-booking:latest -f "${{ github.workspace }}/src/Services/Booking/Dockerfile" . docker build -t meysamh66/booking-microservices-booking:${{ env.TAG_NAME }} -f "${{ github.workspace }}/src/Services/Booking/Dockerfile" .
- name: Publish image - name: Publish image
run: | run: |
docker push meysamh66/booking-microservices-flight:latest docker push meysamh66/booking-microservices-flight:${{ env.TAG_NAME }}
docker push meysamh66/booking-microservices-identity:latest docker push meysamh66/booking-microservices-identity:${{ env.TAG_NAME }}
docker push meysamh66/booking-microservices-passenger:latest docker push meysamh66/booking-microservices-passenger:${{ env.TAG_NAME }}
docker push meysamh66/booking-microservices-booking:latest docker push meysamh66/booking-microservices-booking:${{ env.TAG_NAME }}