mirror of
https://github.com/Radarr/Radarr
synced 2026-01-24 00:13:43 +01: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:
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
if: steps.check-secret.outputs.available == 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: SonarCloud Scan
|
||||
if: steps.check-secret.outputs.available == 'true'
|
||||
uses: SonarSource/sonarcloud-github-action@v2
|
||||
env:
|
||||
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
|
||||
|
||||
- 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
|
||||
uses: aquasecurity/trivy-action@master
|
||||
|
|
|
|||
Loading…
Reference in a new issue