1
0
mirror of synced 2025-11-06 05:10:37 +08:00

chore: Update Dockerfile to use GitHub Container Registry for image build and push

This commit is contained in:
Anduin
2024-06-03 12:02:53 +00:00
parent 9ca4c5f09f
commit 9172f2fdef

View File

@@ -40,11 +40,27 @@ jobs:
commit_user_email: github-actions[bot]@users.noreply.github.com commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
# Build docs # Build docs
- run: echo cook.aiurs.co > CNAME
- run: mkdir docs && echo cook.aiurs.co > docs/CNAME # Deprecated. Now use docker.
- uses: mhausenblas/mkdocs-deploy-gh-pages@master # - run: echo cook.aiurs.co > CNAME
env: # - run: mkdir docs && echo cook.aiurs.co > docs/CNAME
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # - uses: mhausenblas/mkdocs-deploy-gh-pages@master
CUSTOM_DOMAIN: cook.aiurs.co # env:
CONFIG_FILE: mkdocs.yml # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REQUIREMENTS: requirements.txt # CUSTOM_DOMAIN: cook.aiurs.co
# CONFIG_FILE: mkdocs.yml
# REQUIREMENTS: requirements.txt
# Use docker to build current directory ./Dockfile
- 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 hello-world Docker image
run: |
docker build . --tag ghcr.io/anduin2017/how-to-cook:latest
docker run ghcr.io/anduin2017/how-to-cook:latest
docker push ghcr.io/anduin2017/how-to-cook:latest