Skip to content

Commit 04726dc

Browse files
onedr0pWanzenBug
authored andcommitted
ci: nit - only log into GHCR on chart change
Signed-off-by: Devin Buhl <[email protected]>
1 parent 7916ada commit 04726dc

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/release.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ jobs:
2222
cd ./charts/snapshot-controller
2323
make crds
2424
25-
- name: Login to GitHub Container Registry
26-
uses: docker/login-action@v3
27-
with:
28-
registry: ghcr.io
29-
username: ${{ github.actor }}
30-
password: ${{ secrets.GITHUB_TOKEN }}
31-
3225
- name: Configure Git
3326
run: |
3427
git config user.name "$GITHUB_ACTOR"
@@ -42,6 +35,14 @@ jobs:
4235
env:
4336
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4437

38+
- if: ${{ steps.cr.outputs.changed_charts }}
39+
name: Login to GitHub Container Registry
40+
uses: docker/login-action@v3
41+
with:
42+
registry: ghcr.io
43+
username: ${{ github.actor }}
44+
password: ${{ secrets.GITHUB_TOKEN }}
45+
4546
- if: ${{ steps.cr.outputs.changed_charts }}
4647
name: Push Charts to GHCR
4748
run: |

0 commit comments

Comments
 (0)