File tree Expand file tree Collapse file tree 6 files changed +926
-59
lines changed
Expand file tree Collapse file tree 6 files changed +926
-59
lines changed Original file line number Diff line number Diff line change 1+ name : " CodeQL"
2+
3+ on :
4+ push :
5+ tags :
6+ - " *"
7+ branches :
8+ - main
9+ pull_request :
10+ branches :
11+ - main
12+ schedule :
13+ - cron : " 0 6 * * 1"
14+ workflow_dispatch :
15+
16+ jobs :
17+ analyze :
18+ name : Analyze
19+ runs-on : ubuntu-latest
20+ permissions :
21+ actions : read
22+ contents : read
23+ security-events : write
24+
25+ strategy :
26+ fail-fast : false
27+ matrix :
28+ language :
29+ - actions
30+
31+ steps :
32+ - name : Checkout repository
33+ uses : actions/checkout@v4
34+
35+ - name : Initialize CodeQL
36+ uses : github/codeql-action/init@v3
37+ with :
38+ languages : ${{ matrix.language }}
39+ queries : security-and-quality
40+
41+ - name : Perform CodeQL Analysis
42+ uses : github/codeql-action/analyze@v3
43+ with :
44+ category : " /language:${{ matrix.language }}"
Original file line number Diff line number Diff line change 1010 branches :
1111 - main
1212 schedule :
13- - cron : ' 0 0 * * * '
13+ - cron : " 0 6 * * 1 "
1414 workflow_dispatch :
1515
1616permissions :
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