Change docker workflow to exclude preview workflows
- changed the docker workflow to exclude preview workflows from causing the docker workflow to run againpull/251/head
parent
951a773b2c
commit
cdf900d08b
|
|
@ -9,6 +9,7 @@ on:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- ".github/**"
|
- ".github/**"
|
||||||
- "!.github/workflows/docker.yml"
|
- "!.github/workflows/docker.yml"
|
||||||
|
- "!.github/workflows/preview_*.yml"
|
||||||
- ".vscode/**"
|
- ".vscode/**"
|
||||||
- ".gitignore"
|
- ".gitignore"
|
||||||
- ".gitlab-ci.yml"
|
- ".gitlab-ci.yml"
|
||||||
|
|
@ -23,8 +24,8 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
architecture: [linux/amd64]
|
architecture: [linux/amd64]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
@ -37,8 +38,8 @@ jobs:
|
||||||
- name: Cache Docker layers
|
- name: Cache Docker layers
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: /tmp/.buildx-cache/${{ matrix.architecture }}
|
path: /tmp/.buildx-cache/${{ matrix.architecture }}
|
||||||
key: ${{ runner.os }}-buildx-${{ matrix.architecture }}-${{ github.sha }}
|
key: ${{ runner.os }}-buildx-${{ matrix.architecture }}-${{ github.sha }}
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -48,8 +49,8 @@ jobs:
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new/${{ matrix.architecture }},mode=max
|
cache-to: type=local,dest=/tmp/.buildx-cache-new/${{ matrix.architecture }},mode=max
|
||||||
- name: Move cache
|
- name: Move cache
|
||||||
run: |
|
run: |
|
||||||
rm -rf /tmp/.buildx-cache/${{ matrix.architecture }}
|
rm -rf /tmp/.buildx-cache/${{ matrix.architecture }}
|
||||||
mv /tmp/.buildx-cache-new/${{ matrix.architecture }} /tmp/.buildx-cache/${{ matrix.architecture }}
|
mv /tmp/.buildx-cache-new/${{ matrix.architecture }} /tmp/.buildx-cache/${{ matrix.architecture }}
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
needs: [test]
|
needs: [test]
|
||||||
|
|
@ -67,8 +68,8 @@ jobs:
|
||||||
- name: Cache amd64 Docker layers
|
- name: Cache amd64 Docker layers
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: /tmp/.buildx-cache/linux/amd64
|
path: /tmp/.buildx-cache/linux/amd64
|
||||||
key: ${{ runner.os }}-buildx-linux/amd64-${{ github.sha }}
|
key: ${{ runner.os }}-buildx-linux/amd64-${{ github.sha }}
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v3
|
uses: docker/metadata-action@v3
|
||||||
|
|
@ -97,5 +98,5 @@ jobs:
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||||
- name: Move cache
|
- name: Move cache
|
||||||
run: |
|
run: |
|
||||||
rm -rf /tmp/.buildx-cache
|
rm -rf /tmp/.buildx-cache
|
||||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue