From 28ee7fe1c92bd80de705b5c786b1a9321f39ba57 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Thu, 27 May 2021 22:03:17 +0200 Subject: [PATCH] Update GitHub actions --- ...ish-latest-dashboard-and-server-docker.yml | 8 ------- .../publish-latest-dashboard-docker.yml | 22 +++++++++++-------- .../publish-latest-server-docker.yml | 22 +++++++++++-------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/publish-latest-dashboard-and-server-docker.yml b/.github/workflows/publish-latest-dashboard-and-server-docker.yml index 96b58e3a9..cf70a6305 100644 --- a/.github/workflows/publish-latest-dashboard-and-server-docker.yml +++ b/.github/workflows/publish-latest-dashboard-and-server-docker.yml @@ -28,14 +28,6 @@ jobs: id: 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: Docker meta id: meta uses: docker/metadata-action@v3 diff --git a/.github/workflows/publish-latest-dashboard-docker.yml b/.github/workflows/publish-latest-dashboard-docker.yml index 56fa31f8f..ce702328d 100644 --- a/.github/workflows/publish-latest-dashboard-docker.yml +++ b/.github/workflows/publish-latest-dashboard-docker.yml @@ -25,13 +25,18 @@ jobs: id: buildx uses: docker/setup-buildx-action@v1 - - name: Cache Docker layers - uses: actions/cache@v2 + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- + # list of Docker images to use as base name for tags + images: | + elsaworkflows/elsa-dashboard + flavor: | + latest=true + # generate Docker tags based on the following events/attributes + tags: | + type=sha - name: Login to DockerHub uses: docker/login-action@v1 @@ -48,9 +53,8 @@ jobs: file: ./docker/Dockerfile-elsa-dashboard platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true - tags: | - elsaworkflows/elsa-dashboard:latest - elsaworkflows/elsa-dashboard:${{ github.run_number }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-latest-server-docker.yml b/.github/workflows/publish-latest-server-docker.yml index 30ef9d5c2..216a8e5e5 100644 --- a/.github/workflows/publish-latest-server-docker.yml +++ b/.github/workflows/publish-latest-server-docker.yml @@ -25,13 +25,18 @@ jobs: id: buildx uses: docker/setup-buildx-action@v1 - - name: Cache Docker layers - uses: actions/cache@v2 + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- + # list of Docker images to use as base name for tags + images: | + elsaworkflows/elsa-server + flavor: | + latest=true + # generate Docker tags based on the following events/attributes + tags: | + type=sha - name: Login to DockerHub uses: docker/login-action@v1 @@ -48,9 +53,8 @@ jobs: file: ./docker/Dockerfile-elsa-server platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true - tags: | - elsaworkflows/elsa-server:latest - elsaworkflows/elsa-server:${{ github.run_number }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache