diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09234ec4..39f48cb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,24 +73,16 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Extract commit metadata - id: meta - uses: docker/metadata-action@v3 - with: - images: hectorgomezv1/financial-advisor-nestjs - - name: Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 + - name: Build and push image + uses: docker/build-push-action@v4 + env: + DOCKER_IMAGE_TAG: hectorgomezv1/financial-advisor-nestjs:${{ github.ref_name }} with: - context: . - file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - build-args: GITHUB_RUN_NUMBER=${{ github.GITHUB_RUN_NUMBER }} + tags: ${{ env.DOCKER_IMAGE_TAG }}