【发布时间】:2020-08-12 22:22:56
【问题描述】:
有没有办法缓存 docker-compose 使其不会一次又一次地构建? 这是我的操作工作流文件:
name: Github Action
on:
push:
branches:
- staging
jobs:
test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Bootstrap app on Ubuntu
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install global packages
run: npm install -g yarn prisma
- name: Install project deps
if: steps.cache-yarn.outputs.cache-hit != 'true'
run: yarn
- name: Build docker-compose
run: docker-compose -f docker-compose.test.prisma.yml up --build -d
我想缓存 docker build 步骤。我尝试过使用if: steps.cache-docker.outputs.cache-hit != 'true' then only build,但没有成功。
【问题讨论】:
标签: github docker-compose github-actions docker-build building-github-actions