diff --git a/.github/workflows/automatic-pr-labeler.yaml b/.github/workflows/automatic-pr-labeler.yaml new file mode 100644 index 0000000..30a746d --- /dev/null +++ b/.github/workflows/automatic-pr-labeler.yaml @@ -0,0 +1,24 @@ +--- + +# The workflow template for automatic PR labeler. +# It requires to have a configuration file with labels and conditions to apply them. +# The configuration file should be placed in the .github folder and named auto-labeler-config.yaml. +# Example file can be found there: +# https://github.com/Netcracker/qubership-workflow-hub/blob/main/docs/examples/auto-labeler-config.yaml + +name: Automatic PR Labeler + +on: + pull_request_target: + branches: [main] + types: + [opened, reopened, synchronize] + +jobs: + assign-labels: + uses: Netcracker/qubership-workflow-hub/.github/workflows/auto-labeler.yaml@main + name: Assign labels in pull request + if: github.event.pull_request.merged == false + with: + pull_request_number: ${{ github.event.pull_request.number }} + config_file: './.github/auto-labeler-config.yaml' diff --git a/.github/workflows/cdxgen.yaml b/.github/workflows/cdxgen.yaml new file mode 100644 index 0000000..dad19bb --- /dev/null +++ b/.github/workflows/cdxgen.yaml @@ -0,0 +1,36 @@ +--- + +# The workflow will generate the SBOM file for the repository +# and vulerability scan report for the SBOM file using CycloneDX +# The workflow will run on push to main branch and manually triggered workflows +# The results will be stored in the action artifacts + +name: 'CDXGen' +on: + workflow_dispatch: + push: + branches: + - 'main' + +jobs: + cdxgen: + runs-on: ubuntu-latest + steps: + - name: "cdxgen" + uses: netcracker/qubership-workflow-hub/actions/cdxgen@main + deploy-pages: + permissions: + id-token: write + pages: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: cdxgen + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + - name: "Summary" + run: | + echo "${{ steps.deployment.outputs.page_url }}cyclondx-report" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml new file mode 100644 index 0000000..caaee26 --- /dev/null +++ b/.github/workflows/cla.yaml @@ -0,0 +1,19 @@ +--- +name: CLA Assistant +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened,closed,synchronize] + +permissions: + actions: write + contents: read + pull-requests: write + statuses: write + +jobs: + cla_assistant: + uses: Netcracker/qubership-workflow-hub/.github/workflows/cla.yaml@main + secrets: + personal_access_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} diff --git a/.github/workflows/pr-collect-commit-messages.yaml b/.github/workflows/pr-collect-commit-messages.yaml new file mode 100644 index 0000000..d41d3a5 --- /dev/null +++ b/.github/workflows/pr-collect-commit-messages.yaml @@ -0,0 +1,17 @@ +--- + +name: "Add commit messages to PR body" + +on: + pull_request: + types: [opened, synchronize] + +permissions: + pull-requests: write + +jobs: + update-pr-body: + runs-on: ubuntu-latest + steps: + - name: "Update PR body" + uses: netcracker/qubership-workflow-hub/actions/pr-add-messages@main diff --git a/.github/workflows/pr-conventional-commits.yaml b/.github/workflows/pr-conventional-commits.yaml new file mode 100644 index 0000000..cfdd7e0 --- /dev/null +++ b/.github/workflows/pr-conventional-commits.yaml @@ -0,0 +1,21 @@ +--- + +name: Conventional Commits PR Check + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + pull-requests: read +jobs: + build: + name: Conventional Commits + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: webiny/action-conventional-commits@v1.3.0 diff --git a/.github/workflows/pr-lint-title.yaml b/.github/workflows/pr-lint-title.yaml new file mode 100644 index 0000000..5529fa7 --- /dev/null +++ b/.github/workflows/pr-lint-title.yaml @@ -0,0 +1,21 @@ +--- + +name: "Lint PR Title" + +on: + pull_request_target: + types: + - opened + - edited + +permissions: + pull-requests: read + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/profanity-filter.yaml b/.github/workflows/profanity-filter.yaml new file mode 100644 index 0000000..fe4eb0e --- /dev/null +++ b/.github/workflows/profanity-filter.yaml @@ -0,0 +1,18 @@ +--- +name: Profanity filter + +on: + issue_comment: + types: [created, edited] + issues: + types: [opened, edited, reopened] + pull_request_target: + types: [opened, edited, reopened] + +permissions: + issues: write + pull-requests: write + +jobs: + call-apply-filter: + uses: Netcracker/qubership-workflow-hub/.github/workflows/profanityFilter.yaml@main