diff --git a/.gitea/workflow/docker-compose-pr-workflow.yml b/.gitea/workflow/docker-compose-pr-workflow.yml deleted file mode 100644 index 8530c652..00000000 --- a/.gitea/workflow/docker-compose-pr-workflow.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Docker Compose PR Workflow - -on: - push: - branches: - - '*' - create: - branches: - - '*' - -jobs: - create-pr-and-validate: - name: Create PR and Validate Docker Compose - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - name: Check if Pull Request Exists - id: check-pr - uses: prasiman/gocurl@v1.2.0 - with: - url: ${{ secrets.GITEA_API_URL }}/repos/${{ github.repository_owner }}/pulls?state=open&head=${{ github.repository_owner }}:${{ github.ref_name }} - method: GET - headers: | - Authorization: token ${{ secrets.GITEA_API_TOKEN }} - outputs: - response: ${{ steps.check-pr.outputs.response }} - - name: Create Pull Request - if: env.PR_EXISTS != 'true' - uses: arifer612/Gitea-PR-action@v1.2.0 - with: - url: ${{ secrets.RINOA_GITEA_SERVER }} - token: ${{ secrets.BOT_GITEA_TOKEN }} - - name: Run SonarQube Analysis - uses: sonarsource/sonarqube-scan-action@v2.0.0 - with: - SONARQUBE_HOST: ${{ secrets.SONARQUBE_HOST }} - sonar_token: ${{ secrets.SONARQUBE_TOKEN }} - extra_args: | - -Dsonar.projectKey=${{ github.repository }} - -Dsonar.sources=. - -Dsonar.inclusions=docker-compose.yml - -Dsonar.language=yaml,docker - - name: Check SonarQube Quality Gate - id: quality-gate - uses: sonarsource/sonarqube-quality-gate-check-action@v2.0.0 - with: - SONARQUBE_HOST: ${{ secrets.SONARQUBE_HOST }} - sonar_token: ${{ secrets.SONARQUBE_TOKEN }} - - - name: Validate Docker Compose Configuration - if: steps.quality-gate.outputs.quality-gate-status == 'PASSED' - id: docker-lint - run: | - echo "${{ secrets.DOCKER_ENV }}" > .env - docker compose config --no-interpolate --quiet --dry-run - - - name: Merge Pull Request - if: steps.docker-lint.outcome == 'success' - uses: prasiman/gocurl@v1.2.0 - with: - url: ${{ secrets.GITEA_API_URL }}/repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/pulls/${{ github.event.pull_request.number }}/merge - method: POST - headers: | - Authorization: token ${{ secrets.BOT_GITEA_TOKEN }} - Content-Type: application/json - body: | - { - "Do": "merge" - } - - deploy-main: - name: Deploy to Remote Host - needs: create-pr-and-validate - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - steps: - - name: SSH to Remote Host and Deploy Docker Compose - uses: keatonLiu/docker-compose-remote-action@v1.2 - with: - ssh_user: gitea-deploy - ssh_host: 192.168.1.254 - ssh_private_key: ${{ secrets.DEPLOY_PRIVATE_SSH_KEY }} - ssh_host_public_key: $ ${{ secrets.DEPLOY_PUBLIC_SSH_KEY }} - compose_file_path: docker-compose.yml - args: "-d --remove-orphans --build --dry-run" diff --git a/.gitea/workflows/branch-sonarscan-pr-merge.yml b/.gitea/workflows/branch-sonarscan-pr-merge.yml index 10ca8713..3fd901cc 100644 --- a/.gitea/workflows/branch-sonarscan-pr-merge.yml +++ b/.gitea/workflows/branch-sonarscan-pr-merge.yml @@ -94,9 +94,7 @@ jobs: id: convert-json-to-md uses: parkerbxyz/json-to-markdown-table@v1.1.2 with: - json: ${{ env.QUALITY_GATE_RESULT }} - env: - QUALITY_GATE_RESULT: ${{ env.qg_fixed_json }} + json: ${{ env.qg_fixed_json }} - name: Verify markdown output run: |