Skip to content

Commit

Permalink
Update GitHub Actions workflow for Docker deployment
Browse files Browse the repository at this point in the history
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'.
  • Loading branch information
stitts-dev committed May 23, 2024
1 parent 2600d7e commit 792df59
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/deploy-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 792df59

Please sign in to comment.