Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ShilongLee authored Jun 10, 2024
1 parent e9df1b6 commit 45343ed
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build the Docker image
run: docker build . --file Dockerfile --tag shilongli0101/crawler:latest

- name: Push the Docker image
run: docker push shilongli0101/crawler:latest
run: |
docker build . --file Dockerfile --tag shilongli0101/crawler:latest
docker push shilongli0101/crawler:latest
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Tag the Docker image for GitHub Container Registry
run: docker tag shilongli0101/crawler:latest ghcr.io/${{ github.repository_owner }}/crawler:latest

- name: Push the Docker image to GitHub Container Registry
run: docker push ghcr.io/${{ github.repository_owner }}/crawler:latest
- name: Tag and Push the Docker image to GitHub Container Registry
run: |
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/crawler:latest
IMAGE_NAME=$(echo $IMAGE_NAME | tr '[A-Z]' '[a-z]')
docker tag shilongli0101/crawler:latest $IMAGE_NAME
docker push $IMAGE_NAME

0 comments on commit 45343ed

Please sign in to comment.