Skip to content

Commit 44a4380

Browse files
committed
wip
1 parent c811f8e commit 44a4380

File tree

6 files changed

+926
-59
lines changed

6 files changed

+926
-59
lines changed

.github/workflows/codeql.yml

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

.github/workflows/docker-image.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
branches:
1111
- main
1212
schedule:
13-
- cron: '0 0 * * *'
13+
- cron: "0 6 * * 1"
1414
workflow_dispatch:
1515

1616
permissions:
@@ -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)