repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
091a675
parent
d2c81f6
author
Antonio Mika
date
2023-11-09 14:14:28 +0000 UTC
Only build bouncer and caddy when changes are made to their contexts
1 files changed,  +16, -0
M .github/workflows/build.yml
+16, -0
 1@@ -85,18 +85,26 @@ jobs:
 2     steps:
 3     - name: Checkout repo
 4       uses: actions/checkout@v3
 5+    - name: Get changed files
 6+      id: changed-files
 7+      uses: tj-actions/changed-files@v40
 8+      with:
 9+        files: bouncer/**
10     - name: Setup docker
11+      if: steps.changed-files.outputs.any_changed == 'true'
12       uses: ./.github/actions/setup
13       with:
14         registry: ${{ env.REGISTRY }}
15         username: ${{ github.actor }}
16         password: ${{ secrets.GITHUB_TOKEN }}
17     - name: Collect bouncer image metadata
18+      if: steps.changed-files.outputs.any_changed == 'true'
19       id: bouncermeta
20       uses: docker/metadata-action@v4
21       with:
22         images: ${{ env.REGISTRY }}/${{ github.repository }}/bouncer
23     - name: Build and push
24+      if: steps.changed-files.outputs.any_changed == 'true'
25       uses: docker/build-push-action@v3
26       with:
27         context: ./bouncer
28@@ -112,18 +120,26 @@ jobs:
29     steps:
30     - name: Checkout repo
31       uses: actions/checkout@v3
32+    - name: Get changed files
33+      id: changed-files
34+      uses: tj-actions/changed-files@v40
35+      with:
36+        files: caddy/**
37     - name: Setup docker
38+      if: steps.changed-files.outputs.any_changed == 'true'
39       uses: ./.github/actions/setup
40       with:
41         registry: ${{ env.REGISTRY }}
42         username: ${{ github.actor }}
43         password: ${{ secrets.GITHUB_TOKEN }}
44     - name: Collect caddy image metadata
45+      if: steps.changed-files.outputs.any_changed == 'true'
46       id: caddymeta
47       uses: docker/metadata-action@v4
48       with:
49         images: ${{ env.REGISTRY }}/${{ github.repository }}/caddy
50     - name: Build and push
51+      if: steps.changed-files.outputs.any_changed == 'true'
52       uses: docker/build-push-action@v3
53       with:
54         context: ./caddy