From 0d8bc90f199bf0048a8101ee0853b8cfe199aa3d Mon Sep 17 00:00:00 2001 From: trivernis Date: Wed, 11 Nov 2020 09:37:09 +0100 Subject: [PATCH 1/2] Add cache to docker action buildfile Signed-off-by: trivernis --- .github/workflows/docker.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 518c5c4..59ea0b7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -16,6 +16,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - name: Login to DockerHub uses: docker/login-action@v1 From ac6575ccab26fd837ae1dd42111ab0056f177fd3 Mon Sep 17 00:00:00 2001 From: trivernis Date: Wed, 11 Nov 2020 09:39:25 +0100 Subject: [PATCH 2/2] Add docker action cache and platforms input Signed-off-by: trivernis --- .github/workflows/docker.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 59ea0b7..47c7486 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,6 +2,11 @@ name: Docker on: workflow_dispatch: + inputs: + platforms: + description: 'Platforms to build the container for' + required: true + default: 'linux/amd64,linux/arm/v7,linux/arm64' jobs: multi: @@ -35,7 +40,7 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm/v7,linux/arm64 + platforms: ${{github.events.inputs.platforms}} push: true tags: | trivernis/snekcloud-server:alpine \ No newline at end of file