File tree Expand file tree Collapse file tree 6 files changed +814
-38
lines changed
Expand file tree Collapse file tree 6 files changed +814
-38
lines changed Original file line number Diff line number Diff line change 1+ name : " CodeQL"
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+ schedule :
11+ - cron : " 0 6 * * 1"
12+
13+ jobs :
14+ analyze :
15+ name : Analyze
16+ runs-on : ubuntu-latest
17+ permissions :
18+ actions : read
19+ contents : read
20+ security-events : write
21+
22+ strategy :
23+ fail-fast : false
24+ matrix :
25+ language :
26+ - actions
27+
28+ steps :
29+ - name : Checkout repository
30+ uses : actions/checkout@v4
31+
32+ - name : Initialize CodeQL
33+ uses : github/codeql-action/init@v3
34+ with :
35+ languages : ${{ matrix.language }}
36+ queries : security-and-quality
37+
38+ - name : Perform CodeQL Analysis
39+ uses : github/codeql-action/analyze@v3
40+ with :
41+ category : " /language:${{ matrix.language }}"
Original file line number Diff line number Diff line change 2424jobs :
2525 build :
2626 runs-on : ubuntu-latest
27+ env :
28+ HAS_DOCKERHUB_SECRETS : ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }}
2729 steps :
2830 - name : Checkout
2931 uses : actions/checkout@v4
3234 - name : Set up Docker Buildx
3335 uses : docker/setup-buildx-action@v3
3436 - name : Login to Docker Hub
37+ if : ${{ env.HAS_DOCKERHUB_SECRETS }}
3538 uses : docker/login-action@v3
3639 with :
3740 username : ${{ secrets.DOCKERHUB_USERNAME }}
6467 with :
6568 context : .
6669 platforms : ${{ env.PLATFORMS }}
70+ pull : true
6771 cache-from : type=gha
6872 cache-to : type=gha
6973 push : true
8488 write-comment : true
8589 github-token : ${{ secrets.GITHUB_TOKEN }}
8690 - name : Update repo description
87- if : ${{ github.ref == 'refs/heads/main' }}
91+ if : ${{ github.ref == 'refs/heads/main' && env.HAS_DOCKERHUB_SECRETS }}
8892 uses : peter-evans/dockerhub-description@v4
8993 with :
9094 username : ${{ secrets.DOCKERHUB_USERNAME }}
You can’t perform that action at this time.
0 commit comments