Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fanmingming authored Aug 25, 2024
1 parent 8d7c30d commit b481e66
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ jobs:

# Step 3: Build the Docker image
- name: Build the Docker image
run: docker build . --file Dockerfile --tag udpxy:$(date +%s)
run: |
IMAGE_TAG=$(date +%s)
docker build . --file Dockerfile --tag udpxy:$IMAGE_TAG
# Step 4: Tag the Docker image
- name: Tag the Docker image
run: docker tag udpxy:$(date +%s) ${{ secrets.DOCKER_USERNAME }}/udpxy:latest
run: |
IMAGE_TAG=$(date +%s)
docker tag udpxy:$IMAGE_TAG ${{ secrets.DOCKER_USERNAME }}/udpxy:latest
# Step 5: Push the Docker image to Docker Hub
- name: Push the Docker image to Docker Hub
run: docker push ${{ secrets.DOCKER_USERNAME }}/udpxy:latest
run: |
IMAGE_TAG=$(date +%s)
docker push ${{ secrets.DOCKER_USERNAME }}/udpxy:latest

0 comments on commit b481e66

Please sign in to comment.