From 792df598412d16188cc7ffdfb4fa04b9d85cb709 Mon Sep 17 00:00:00 2001 From: "stitts.dev" Date: Wed, 22 May 2024 22:12:05 -0400 Subject: [PATCH] Update GitHub Actions workflow for Docker deployment The workflow in the .github/workflows/deploy-container.yaml file has been updated to use more recent actions versions and to set up Docker Buildx before logging in to Docker Hub. The secrets used for Docker Hub authentication have been renamed to 'DOCKERHUB_USERNAME' and 'DOCKERHUB_TOKEN' respectively. The Docker build and push action now uses version 5 and the tag for the Docker image has been changed to 'user/portfolio:latest'. --- .github/workflows/deploy-container.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-container.yaml b/.github/workflows/deploy-container.yaml index 9dba010e..1857e35b 100644 --- a/.github/workflows/deploy-container.yaml +++ b/.github/workflows/deploy-container.yaml @@ -10,17 +10,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v4.1.4 - - name: Log in to Docker Hub + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push Docker image - uses: docker/build-push-action@v2 + - name: Build and push + uses: docker/build-push-action@v5 with: context: . push: true - tags: portfolio:latest + tags: user/portfolio:latest