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 b481e66 commit 2ade4fd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# Step 3: Build the Docker image
# Step 3: Set the image tag
- name: Set IMAGE_TAG
id: vars
run: echo "IMAGE_TAG=$(date +%s)" >> $GITHUB_ENV

# Step 4: Build the Docker image
- name: Build the Docker image
run: |
IMAGE_TAG=$(date +%s)
docker build . --file Dockerfile --tag udpxy:$IMAGE_TAG
run: docker build . --file Dockerfile --tag udpxy:${{ env.IMAGE_TAG }}

# Step 4: Tag the Docker image
run: |
IMAGE_TAG=$(date +%s)
docker tag udpxy:$IMAGE_TAG ${{ secrets.DOCKER_USERNAME }}/udpxy:latest
# Step 5: Tag the Docker image
- name: Tag the Docker image
run: docker tag udpxy:${{ env.IMAGE_TAG }} ${{ secrets.DOCKER_USERNAME }}/udpxy:latest

# Step 5: Push the Docker image to Docker Hub
# Step 6: Push the Docker image to Docker Hub
- name: Push the Docker image to Docker Hub
run: |
IMAGE_TAG=$(date +%s)
docker push ${{ secrets.DOCKER_USERNAME }}/udpxy:latest
run: docker push ${{ secrets.DOCKER_USERNAME }}/udpxy:latest

0 comments on commit 2ade4fd

Please sign in to comment.