Update image when triggered via schedules pipeline

This commit is contained in:
Tim de Pater
2023-01-15 07:58:40 +01:00
parent c397b92945
commit d01c49f64b

View File

@@ -47,20 +47,20 @@ jobs:
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule')
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
- name: Login to Docker Hub
if: (github.ref == 'refs/heads/master' && github.event_name == 'push') || contains(github.ref, 'refs/tags/')
if: (github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule' ) || contains(github.ref, 'refs/tags/')
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build multi-arch image and push latest tag
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule')
run: |-
docker buildx build \
--cache-from=$IMAGE_NAME:latest \