Skip to content

Commit

Permalink
upload to docker hub
Browse files Browse the repository at this point in the history
  • Loading branch information
Hui Mi committed Jun 22, 2024
1 parent 849292f commit e1451ab
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,14 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build and push Docker image
uses: docker/compose-action@v2
with:
compose-file: docker-compose.yml
push: true
tags: latest
- name: Build the Docker image
run: docker-compose -f docker-compose.yml build

- name: Log into Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image with Buildx
uses: docker/build-push-action@v2
with:
context: .
file: docker-compose.yml
tags: ${{ secrets.DOCKER_USERNAME }}/your-image-name:latest
- name: Push the Docker image to Docker Hub
run: docker-compose -f docker-compose.yml push

0 comments on commit e1451ab

Please sign in to comment.