Skip to content

Merge pull request #631 from asdf2014/dependabot/maven/apache.camel.s… #22

Merge pull request #631 from asdf2014/dependabot/maven/apache.camel.s…

Merge pull request #631 from asdf2014/dependabot/maven/apache.camel.s… #22

Workflow file for this run

name: Docker
on:
push:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/*.ipynb'
pull_request:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/*.ipynb'
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