chore: Update Dockerfile to use GitHub Container Registry for image build and push
This commit is contained in:
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@@ -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
|
||||||
Reference in New Issue
Block a user