mirror of
https://github.com/Radarr/Radarr
synced 2026-05-08 14:00:35 +02:00
fix(ci): correct Dockerfile path and skip SonarCloud when token missing
This commit is contained in:
parent
81b3814c1a
commit
4fe3c5f483
2 changed files with 13 additions and 1 deletions
12
.github/workflows/sonarcloud.yml
vendored
12
.github/workflows/sonarcloud.yml
vendored
|
|
@ -21,12 +21,24 @@ jobs:
|
||||||
analyze:
|
analyze:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check for SONAR_TOKEN
|
||||||
|
id: check-secret
|
||||||
|
run: |
|
||||||
|
if [ -n "${{ secrets.SONAR_TOKEN }}" ]; then
|
||||||
|
echo "available=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "available=false" >> $GITHUB_OUTPUT
|
||||||
|
echo "::warning::SONAR_TOKEN not configured - skipping SonarCloud scan"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
if: steps.check-secret.outputs.available == 'true'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: SonarCloud Scan
|
- name: SonarCloud Scan
|
||||||
|
if: steps.check-secret.outputs.available == 'true'
|
||||||
uses: SonarSource/sonarcloud-github-action@v2
|
uses: SonarSource/sonarcloud-github-action@v2
|
||||||
env:
|
env:
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
|
|
||||||
2
.github/workflows/trivy.yml
vendored
2
.github/workflows/trivy.yml
vendored
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: docker build -t ghcr.io/cheir-mneme/aletheia:${{ github.sha }} .
|
run: docker build -t ghcr.io/cheir-mneme/aletheia:${{ github.sha }} -f docker/Dockerfile .
|
||||||
|
|
||||||
- name: Run Trivy vulnerability scanner
|
- name: Run Trivy vulnerability scanner
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@master
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue