Skip to content

Commit

Permalink
Added SonarQube.
Browse files Browse the repository at this point in the history
  • Loading branch information
soup-bowl committed Oct 9, 2024
1 parent bb4c0e6 commit 179ed6b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,42 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Codebase
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: sonarsource/sonarqube-scan-action@v3
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

- name: Login to ghcr.io
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u soup-bowl --password-stdin

- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Build for Development
if: ${{ github.ref_name == 'edge' }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
push: true
tags: soupbowl/hot-this-week:edge,ghcr.io/soup-bowl/hot-this-week:edge
platforms: linux/amd64,linux/arm64

- name: Build for Production
if: ${{ github.ref_name == 'main' }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
push: true
tags: soupbowl/hot-this-week:latest,ghcr.io/soup-bowl/hot-this-week:latest
Expand Down
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sonar.projectKey=soup-bowl_hot-this-week_af12a48e-6fc3-428d-98d3-9f1e212f4fac

0 comments on commit 179ed6b

Please sign in to comment.