Update docker-image.yml

This commit is contained in:
Choco
2024-11-22 17:46:49 +08:00
parent 92d1a93ff0
commit d1e02c5714

View File

@@ -7,13 +7,21 @@ on:
- '**.md'
pull_request:
branches: [ "**" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag vocard:latest
- name: Log in to GitHub Docker Registry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push the Docker image
run: docker tag vocard:latest ghcr.io/${{ github.repository }}/vocard:latest
- run: docker push ghcr.io/${{ github.repository }}/vocard:latest