From 1bca448b5399992833b06dc9614291eef9b4222a Mon Sep 17 00:00:00 2001 From: meysamhadeli Date: Tue, 24 Jan 2023 21:25:29 +0330 Subject: [PATCH] . --- .github/workflows/build-publish.yml | 30 +++++++++++++---------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 631620b..4f579ff 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -19,11 +19,6 @@ jobs: - name: Checkout code 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 uses: docker/login-action@v2 with: @@ -33,19 +28,20 @@ jobs: - name: Login to Github Packages uses: docker/login-action@v2 with: - registry: ghcr.io + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build image and push to Docker Hub and GitHub Container Registry - uses: docker/build-push-action@v2 - with: - # relative path to the place where source code with Dockerfile is located - context: ./src/Services/Flight - # 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' }} + + - name: Build image + run: | +# docker build -t meysamh66/booking-microservices/flight:latest -f ./src/Services/Flight/Dockerfile . + docker build . -t ${{ env.REGISTRY }}/${{ github.repository }}/flight:latest -f "${{ github.workspace }}/src/Services/Catalogs/Flight/Dockerfile ." + + + - name: Publish image + run: | + docker push "${{ env.REGISTRY }}/${{ github.repository }}/flight:latest}}" +# docker push meysamh66/booking-microservices/flight:latest +