Skip to content

Commit 37cec71

Browse files
refactor: only login to docker.io on when needing to push
Signed-off-by: K3rnelPan1c <[email protected]>
1 parent 58e8d66 commit 37cec71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/_meta-build.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ jobs:
8181

8282
- name: Login to Docker.io
8383
uses: docker/[email protected]
84+
if: ${{ github.ref == 'refs/heads/master' }}
8485
with:
8586
registry: docker.io
8687
username: ${{ secrets.registry-0-usr }}
@@ -119,7 +120,7 @@ jobs:
119120
vuln-type: 'os'
120121

121122
- name: Upload Trivy Scan Results to GitHub Security Tab
122-
if: github.ref == 'refs/heads/master'
123+
if: ${{ github.ref == 'refs/heads/master' }}
123124
uses: github/codeql-action/upload-sarif@v2
124125
with:
125126
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)