Skip to content

挂载持久化卷时,可以提前创建好对应目录,这样可以不依赖docker的自动创建目录的特性,避免权限问题 (#203) #261

挂载持久化卷时,可以提前创建好对应目录,这样可以不依赖docker的自动创建目录的特性,避免权限问题 (#203)

挂载持久化卷时,可以提前创建好对应目录,这样可以不依赖docker的自动创建目录的特性,避免权限问题 (#203) #261

Workflow file for this run

name: Docker
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: reviewdog/action-shellcheck@v1
- name: Install Dependencies
run: make install
# - name: Build
# run: ./scripts/build.sh
- name: Test
run: make test
# https://www.prestonlamb.com/blog/creating-a-docker-image-with-github-actions
publish:
name: Publish
needs: [build]
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v[0-9]+'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: make install
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKER_PERSONAL_ACCESS_TOKEN }} | docker login -u zixia --password-stdin
- name: Build the Docker image
run: docker build -t artifact_image .
- name: Deploy to Docker Hub
run: bash -x ./scripts/deploy.sh artifact_image