From ab335c2559b3bae9835091ab88dd28653f9c9143 Mon Sep 17 00:00:00 2001 From: Formartha Date: Tue, 27 Feb 2024 22:10:37 +0200 Subject: [PATCH] Update docker-image.yml --- .github/workflows/docker-image.yml | 31 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index a2d87b6..c6fcbdb 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,23 +11,24 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 - - name: Get Git commit SHA - id: git_sha - run: echo "::set-output name=sha::$(git rev-parse --short HEAD)" + - name: Get Git commit SHA + id: git_sha + run: echo "::set-output name=sha::$(git rev-parse --short HEAD)" - - name: Build the Docker image - run: | - docker build . --file Dockerfile --tag formartha/ai1899:${{ steps.git_sha.outputs.sha }} + - name: Build the Docker image + run: | + docker build . --file Dockerfile --tag formartha/ai1899:${{ steps.git_sha.outputs.sha }} --compress - - name: Log into Docker Hub - run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + - name: Log into Docker Hub + run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - - name: Push Docker image to Docker Hub - run: | - docker tag formartha/ai1899:${{ steps.git_sha.outputs.sha }} formartha/ai1899:latest - docker push formartha/ai1899:latest + - name: Push Docker image to Docker Hub + run: | + docker tag formartha/ai1899:${{ steps.git_sha.outputs.sha }} formartha/ai1899:latest + docker push formartha/ai1899:latest