next-terminal/.github/workflows/docker.yml
dushixiang 7d5833c97b Update docker.yml
增加忽略png图片
2021-01-31 20:40:25 +08:00

42 lines
1.0 KiB
YAML

name: Docker image
on:
push:
branches:
- "master"
paths-ignore:
- ".gitignore"
- "*.md"
- "*.png"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: |
cd web
npm install
npm run build
- name: Log into registry
run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Build and push image
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/next-terminal -f Dockerfile .
docker push ghcr.io/${{ github.repository_owner }}/next-terminal
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ github.repository_owner }}/next-terminal
tag_with_ref: true