Skip to content

Merge pull request #907 from asdf2014/dependabot/maven/junit-jupiter-… #588

Merge pull request #907 from asdf2014/dependabot/maven/junit-jupiter-…

Merge pull request #907 from asdf2014/dependabot/maven/junit-jupiter-… #588

Workflow file for this run

name: Docker
on:
push:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/*.ipynb'
- '.gitignore'
pull_request:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/*.ipynb'
- '.gitignore'
jobs:
build:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/docker-layers
key: docker-layers-${{ runner.os }}-${{ github.sha }}
restore-keys: docker-layers-${{ runner.os }}-
- name: Load cached Docker layers
run: |
if [ -d "/tmp/docker-layers" ]; then
docker load < /tmp/docker-layers/cache.tar
fi
- name: Build Docker image
run: |
docker -D build \
--cache-from=yuzhouwan:1.1.2-SNAPSHOT \
-t yuzhouwan:1.1.2-SNAPSHOT \
-f distribution/docker/Dockerfile .
- name: Save Docker layers
run: |
mkdir -p /tmp/docker-layers
docker save yuzhouwan:1.1.2-SNAPSHOT > /tmp/docker-layers/cache.tar