From cdf900d08bc7e889f695a9c6f0cb7b65b2cc8472 Mon Sep 17 00:00:00 2001 From: brecert Date: Tue, 14 Sep 2021 00:26:18 -0400 Subject: [PATCH] Change docker workflow to exclude preview workflows - changed the docker workflow to exclude preview workflows from causing the docker workflow to run again --- .github/workflows/docker.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 424f4a8c..5e70a239 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,6 +9,7 @@ on: paths-ignore: - ".github/**" - "!.github/workflows/docker.yml" + - "!.github/workflows/preview_*.yml" - ".vscode/**" - ".gitignore" - ".gitlab-ci.yml" @@ -23,8 +24,8 @@ jobs: test: runs-on: ubuntu-latest strategy: - matrix: - architecture: [linux/amd64] + matrix: + architecture: [linux/amd64] steps: - name: Checkout uses: actions/checkout@v2 @@ -37,8 +38,8 @@ jobs: - name: Cache Docker layers uses: actions/cache@v2 with: - path: /tmp/.buildx-cache/${{ matrix.architecture }} - key: ${{ runner.os }}-buildx-${{ matrix.architecture }}-${{ github.sha }} + path: /tmp/.buildx-cache/${{ matrix.architecture }} + key: ${{ runner.os }}-buildx-${{ matrix.architecture }}-${{ github.sha }} - name: Build uses: docker/build-push-action@v2 with: @@ -48,8 +49,8 @@ jobs: cache-to: type=local,dest=/tmp/.buildx-cache-new/${{ matrix.architecture }},mode=max - name: Move cache run: | - rm -rf /tmp/.buildx-cache/${{ matrix.architecture }} - mv /tmp/.buildx-cache-new/${{ matrix.architecture }} /tmp/.buildx-cache/${{ matrix.architecture }} + rm -rf /tmp/.buildx-cache/${{ matrix.architecture }} + mv /tmp/.buildx-cache-new/${{ matrix.architecture }} /tmp/.buildx-cache/${{ matrix.architecture }} publish: needs: [test] @@ -67,8 +68,8 @@ jobs: - name: Cache amd64 Docker layers uses: actions/cache@v2 with: - path: /tmp/.buildx-cache/linux/amd64 - key: ${{ runner.os }}-buildx-linux/amd64-${{ github.sha }} + path: /tmp/.buildx-cache/linux/amd64 + key: ${{ runner.os }}-buildx-linux/amd64-${{ github.sha }} - name: Docker meta id: meta uses: docker/metadata-action@v3 @@ -97,5 +98,5 @@ jobs: cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - name: Move cache run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache