mirror of
https://github.com/netfun2000/docker-php-nginx.git
synced 2026-04-22 08:39:51 +08:00
Update image when triggered via schedules pipeline
This commit is contained in:
6
.github/workflows/build.yaml
vendored
6
.github/workflows/build.yaml
vendored
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user