Skip to content

Commit d01c49f

Browse files
committed
Update image when triggered via schedules pipeline
1 parent c397b92 commit d01c49f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/build.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,20 @@ jobs:
4747
output: 'trivy-results.sarif'
4848

4949
- name: Upload Trivy scan results to GitHub Security tab
50-
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
50+
if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule')
5151
uses: github/codeql-action/upload-sarif@v2
5252
with:
5353
sarif_file: 'trivy-results.sarif'
5454

5555
- name: Login to Docker Hub
56-
if: (github.ref == 'refs/heads/master' && github.event_name == 'push') || contains(github.ref, 'refs/tags/')
56+
if: (github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule' ) || contains(github.ref, 'refs/tags/')
5757
uses: docker/login-action@v2
5858
with:
5959
username: ${{ secrets.DOCKERHUB_USERNAME }}
6060
password: ${{ secrets.DOCKERHUB_TOKEN }}
6161

6262
- name: Build multi-arch image and push latest tag
63-
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
63+
if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule')
6464
run: |-
6565
docker buildx build \
6666
--cache-from=$IMAGE_NAME:latest \

0 commit comments

Comments
 (0)