Skip to content

Commit 1a2c789

Browse files
committed
ci: update of common workflows
1 parent 36ce31b commit 1a2c789

File tree

7 files changed

+161
-0
lines changed

7 files changed

+161
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
3+
# The workflow template for automatic PR labeler.
4+
# It requires to have a configuration file with labels and conditions to apply them.
5+
# The configuration file should be placed in the .github folder and named auto-labeler-config.yaml.
6+
# Example file can be found there:
7+
# https://github.com/Netcracker/qubership-workflow-hub/blob/main/docs/examples/auto-labeler-config.yaml
8+
9+
name: Automatic PR Labeler
10+
11+
on:
12+
pull_request_target:
13+
branches: [main]
14+
types:
15+
[opened, reopened, synchronize]
16+
17+
permissions:
18+
pull-requests: write
19+
contents: read
20+
issues: write
21+
22+
jobs:
23+
assign-labels:
24+
uses: Netcracker/qubership-workflow-hub/.github/workflows/auto-labeler.yaml@main
25+
name: Assign labels in pull request
26+
if: github.event.pull_request.merged == false
27+
with:
28+
pull_request_number: ${{ github.event.pull_request.number }}
29+
config_file: './.github/auto-labeler-config.yaml'

.github/workflows/cdxgen.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
3+
# The workflow will generate the SBOM file for the repository
4+
# and vulerability scan report for the SBOM file using CycloneDX
5+
# The workflow will run on push to main branch and manually triggered workflows
6+
# The results will be stored in the action artifacts
7+
8+
name: 'CDXGen'
9+
on:
10+
workflow_dispatch:
11+
push:
12+
branches:
13+
- 'main'
14+
15+
jobs:
16+
cdxgen:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: "cdxgen"
20+
uses: netcracker/qubership-workflow-hub/actions/cdxgen@main
21+
deploy-pages:
22+
permissions:
23+
id-token: write
24+
pages: write
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
28+
runs-on: ubuntu-latest
29+
needs: cdxgen
30+
steps:
31+
- name: Deploy to GitHub Pages
32+
id: deployment
33+
uses: actions/deploy-pages@v4
34+
- name: "Summary"
35+
run: |
36+
echo "${{ steps.deployment.outputs.page_url }}cyclondx-report" >> $GITHUB_STEP_SUMMARY

.github/workflows/cla.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: CLA Assistant
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_target:
7+
types: [opened,closed,synchronize]
8+
9+
permissions:
10+
actions: write
11+
contents: read
12+
pull-requests: write
13+
statuses: write
14+
15+
jobs:
16+
cla_assistant:
17+
uses: Netcracker/qubership-workflow-hub/.github/workflows/cla.yaml@main
18+
secrets:
19+
personal_access_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
3+
name: "Add commit messages to PR body"
4+
5+
on:
6+
pull_request:
7+
types: [opened, synchronize]
8+
9+
permissions:
10+
pull-requests: write
11+
12+
jobs:
13+
update-pr-body:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: "Update PR body"
17+
uses: netcracker/qubership-workflow-hub/actions/pr-add-messages@main
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
3+
name: Conventional Commits PR Check
4+
5+
on:
6+
pull_request_target:
7+
types:
8+
- opened
9+
- edited
10+
- synchronize
11+
12+
permissions:
13+
pull-requests: read
14+
jobs:
15+
build:
16+
name: Conventional Commits
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: webiny/[email protected]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
3+
name: "Lint PR Title"
4+
5+
on:
6+
pull_request_target:
7+
types:
8+
- opened
9+
- edited
10+
11+
permissions:
12+
pull-requests: read
13+
14+
jobs:
15+
main:
16+
name: Validate PR title
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: amannn/action-semantic-pull-request@v5
20+
env:
21+
GITHUB_TOKEN: ${{ github.token }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Profanity filter
3+
4+
on:
5+
issue_comment:
6+
types: [created, edited]
7+
issues:
8+
types: [opened, edited, reopened]
9+
pull_request_target:
10+
types: [opened, edited, reopened]
11+
12+
permissions:
13+
issues: write
14+
pull-requests: write
15+
16+
jobs:
17+
call-apply-filter:
18+
uses: Netcracker/qubership-workflow-hub/.github/workflows/profanityFilter.yaml@main

0 commit comments

Comments
 (0)