Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yao177 authored Feb 5, 2024
1 parent 12c948e commit 53c1298
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,18 @@ jobs:

steps:
- uses: actions/checkout@v3

# 登录到GitHub Container Registry
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the Docker image
run: docker build . --file Dockerfile --tag telegram-get-remote-ip:$(date +%s)
run: docker build . --file Dockerfile --tag ghcr.io/${{ github.repository }}/telegram-get-remote-ip:${{ github.sha }}

# 推送镜像到GitHub Container Registry
- name: Push the Docker image
run: docker push ghcr.io/${{ github.repository }}/telegram-get-remote-ip:${{ github.sha }}

0 comments on commit 53c1298

Please sign in to comment.