From ca8b5dea7f61926b2884afe77729c5feec91b948 Mon Sep 17 00:00:00 2001 From: Jamie Banks Date: Thu, 14 May 2026 11:47:22 +0000 Subject: [PATCH] ci: :rocket: dev build --- .gitea/workflows/ci.yml | 2 -- .gitea/workflows/dev.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/dev.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 22f685e..7d700ba 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,8 +1,6 @@ name: CI on: - push: - branches: [ main ] workflow_dispatch: jobs: diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml new file mode 100644 index 0000000..1d99a10 --- /dev/null +++ b/.gitea/workflows/dev.yml @@ -0,0 +1,48 @@ +name: CI + +on: + push: + branches: [ main ] + workflow_dispatch: + +jobs: + build-and-push: + name: Build and Push + runs-on: build-htz-01 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Build and push Docker image + run: | + docker build -t cr.jdbnet.co.uk/public/ssh:dev . + docker push cr.jdbnet.co.uk/public/ssh:dev + + sonarqube: + name: SonarQube + runs-on: build-htz-01 + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Create Valid Project Key + id: sonar_setup + run: | + CLEAN_KEY=$(echo "${{ gitea.repository }}" | tr '/' ':') + echo "key=$CLEAN_KEY" >> $GITHUB_OUTPUT + + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + continue-on-error: true + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + with: + args: > + -Dsonar.projectKey=${{ steps.sonar_setup.outputs.key }} + -Dsonar.projectName=${{ gitea.repository }} + -Dsonar.qualitygate.wait=true \ No newline at end of file