Sonar Scan Workflow #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
# Trigger analysis when pushing to your main branches, and when creating a pull request. | |
workflow_dispatch: | |
inputs: | |
branch_name: | |
description: 'Name of the branch' | |
required: true | |
name: Sonar Scan Workflow | |
jobs: | |
sonarqube: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Disabling shallow clones is recommended for improving the relevancy of reporting | |
fetch-depth: 0 | |
- name: Copy file to branch | |
run: | | |
git checkout ${{inputs.branch_name}} | |
bash create-file.sh | |
git status | |
git add .github/workflows/sonar-scan.yml | |
git config --local user.name "github-actions" | |
git config --local user.email "github-actions@github.com" | |
git commit -m "Add file for SonarQube analysis" | |
git push origin ${{inputs.branch_name}} | |