From 4c0dccea2872648b7f415b45339a14b465e0e82d Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 27 Nov 2020 15:48:44 +0100 Subject: [PATCH] Rename CI job & add Docker cache (#119) * Rename CI job * Added cache --- .github/workflows/ci.yml | 3 +++ .github/workflows/deploy-docker.yml | 5 ++++- .github/workflows/release.yml | 3 +++ Makefile | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d3566b2..387607c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,9 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - uses: satackey/action-docker-layer-caching@v0.0.8 + continue-on-error: true + - name: Build docker images run: layer=${{ matrix.layer }} make docker-images diff --git a/.github/workflows/deploy-docker.yml b/.github/workflows/deploy-docker.yml index 768dcb89..7e12b9b6 100644 --- a/.github/workflows/deploy-docker.yml +++ b/.github/workflows/deploy-docker.yml @@ -9,12 +9,15 @@ on: jobs: publish: - name: Building images + name: Deploy images runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 + - uses: satackey/action-docker-layer-caching@v0.0.8 + continue-on-error: true + - name: Get the version id: get_version run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24ebba94..6e8a2f86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,9 @@ jobs: with: fetch-depth: 0 + - uses: satackey/action-docker-layer-caching@v0.0.8 + continue-on-error: true + - name: Download dependencies run: | composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable diff --git a/Makefile b/Makefile index 8347eb6e..17abd3e8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL := /bin/bash layer ?= * -parallel = $(if $(shell which parallel),true,false) +parallel ?= $(if $(shell which parallel),true,false) resolve_php_versions = $(or $(php_versions),`jq -r '.php | join(" ")' ${1}/config.json`) define generate_list