summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorRobert Göhler <github@ghlr.de>2024-05-28 12:13:07 +0200
committerGitHub <noreply@github.com>2024-05-28 12:13:07 +0200
commit2be191247b2f10f1bc3ae38f8bcb565ce0af0635 (patch)
tree62bc12399b083cf5348d4d00784ab38ecfd6876f /.github/workflows
parente5dde95b686686fa7cd843834ffe4eac67cba9bf (diff)
parent253078212d42cbc08c3956ae2a6a10fff6f8d877 (diff)
downloadvyos-documentation-2be191247b2f10f1bc3ae38f8bcb565ce0af0635.tar.gz
vyos-documentation-2be191247b2f10f1bc3ae38f8bcb565ce0af0635.zip
Merge pull request #1464 from vyos/feature/T6410-workflows-fix
T6410: applied reusable workflows (auto-author-assign,check-pr-conflicts,lint-doc)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/auto-author-assign.yml21
-rw-r--r--.github/workflows/check-pr-conflicts.yml14
-rw-r--r--.github/workflows/lint-doc.yml10
-rw-r--r--.github/workflows/main.yml27
-rw-r--r--.github/workflows/pr-conflicts.yml19
5 files changed, 28 insertions, 63 deletions
diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml
index 81134206..c3696ea4 100644
--- a/.github/workflows/auto-author-assign.yml
+++ b/.github/workflows/auto-author-assign.yml
@@ -3,25 +3,12 @@ on:
pull_request_target:
types: [opened, reopened, ready_for_review, locked]
+
permissions:
pull-requests: write
+ contents: read
jobs:
- # https://github.com/marketplace/actions/auto-author-assign
assign-author:
- runs-on: ubuntu-latest
- steps:
- - name: "Assign Author to PR"
- uses: toshimaru/auto-author-assign@v1.3.5
- with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
-
- # https://github.com/shufo/auto-assign-reviewer-by-files
- assign_reviewer:
- runs-on: ubuntu-latest
- steps:
- - name: Request review based on files changes and/or groups the author belongs to
- uses: shufo/auto-assign-reviewer-by-files@v1.1.1
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- config: .github/reviewers.yml
+ uses: vyos/.github/.github/workflows/assign-author.yml@feature/T6349-reusable-workflows
+ secrets: inherit
diff --git a/.github/workflows/check-pr-conflicts.yml b/.github/workflows/check-pr-conflicts.yml
new file mode 100644
index 00000000..0c659e6e
--- /dev/null
+++ b/.github/workflows/check-pr-conflicts.yml
@@ -0,0 +1,14 @@
+
+name: "PR Conflicts checker"
+on:
+ pull_request_target:
+ types: [synchronize]
+
+permissions:
+ pull-requests: write
+ contents: read
+
+jobs:
+ check-pr-conflict-call:
+ uses: vyos/.github/.github/workflows/check-pr-merge-conflict.yml@feature/T6349-reusable-workflows
+ secrets: inherit
diff --git a/.github/workflows/lint-doc.yml b/.github/workflows/lint-doc.yml
new file mode 100644
index 00000000..7f2f2099
--- /dev/null
+++ b/.github/workflows/lint-doc.yml
@@ -0,0 +1,10 @@
+name: Lint Doc
+on:
+ pull_request:
+
+jobs:
+ lint-doc:
+ uses: vyos/.github/.github/workflows/lint-doc.yml@feature/T6349-reusable-workflows
+ secrets: inherit
+
+
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index 67556017..00000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-name: Linting
-on:
- pull_request:
-
-jobs:
- lint:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: File Changes
- id: file_changes
- uses: trilom/file-changes-action@v1.2.3
-
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: '3.x'
-
- - name: run python based linter
- run: python .github/vyos-linter.py '${{ steps.file_changes.outputs.files_modified }}'
-
- env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
-
-
diff --git a/.github/workflows/pr-conflicts.yml b/.github/workflows/pr-conflicts.yml
deleted file mode 100644
index 8f2db469..00000000
--- a/.github/workflows/pr-conflicts.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: "PR Conflicts checker"
-on:
- pull_request_target:
- types: [synchronize]
-
-jobs:
- Conflict_Check:
- name: 'Check PR status: conflicts and resolution'
- runs-on: ubuntu-22.04
- steps:
- - name: check if PRs are dirty
- uses: eps1lon/actions-label-merge-conflict@releases/2.x
- with:
- dirtyLabel: "state: conflict"
- removeOnDirtyLabel: "state: conflict resolved"
- repoToken: "${{ secrets.GITHUB_TOKEN }}"
- commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
- commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."
-