Skip to content

chore: Update Dockerfile to use GitHub Container Registry for image b… #545

chore: Update Dockerfile to use GitHub Container Registry for image b…

chore: Update Dockerfile to use GitHub Container Registry for image b… #545

Workflow file for this run

name: build
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
Rebuild-everything:
runs-on: ubuntu-latest
steps:
# Checkout, install tools..
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
# Generate Readme, mkdocs.
- run: node ./.github/readme-generate.js
# Lint issues first. (Without node_modules)
- run: npm install
- run: npm run lint
# Save files.
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[ci skip] Automatic file changes/fix'
branch: 'master'
file_pattern: ':/*.*'
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
# Build docs
# Deprecated. Now use docker.
# - run: echo cook.aiurs.co > CNAME
# - run: mkdir docs && echo cook.aiurs.co > docs/CNAME
# - uses: mhausenblas/mkdocs-deploy-gh-pages@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 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 push ghcr.io/anduin2017/how-to-cook:latest