Skip to content

Commit 96f60b6

Browse files
committed
wip
1 parent c811f8e commit 96f60b6

File tree

6 files changed

+814
-38
lines changed

6 files changed

+814
-38
lines changed

.github/workflows/codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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 }}"

.github/workflows/docker-image.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ env:
2424
jobs:
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
@@ -32,6 +34,7 @@ jobs:
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 }}
@@ -64,6 +67,7 @@ jobs:
6467
with:
6568
context: .
6669
platforms: ${{ env.PLATFORMS }}
70+
pull: true
6771
cache-from: type=gha
6872
cache-to: type=gha
6973
push: true
@@ -84,7 +88,7 @@ jobs:
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 }}

0 commit comments

Comments
 (0)