mirror of
https://github.com/ScoopInstaller/Java.git
synced 2026-09-07 12:58:04 +08:00
(chore): add lint-pr workflow and use pinned actions
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
This commit is contained in:
parent
4034b59303
commit
78fd9c133e
18
.github/workflows/excavator.yml
vendored
18
.github/workflows/excavator.yml
vendored
@ -3,7 +3,8 @@ name: Excavator
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 */4 * * *'
|
||||
# run every 4 hours
|
||||
- cron: '20 */4 * * *'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@ -13,11 +14,10 @@ jobs:
|
||||
name: Excavate
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- name: Excavate
|
||||
uses: ScoopInstaller/GithubActions@main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SKIP_UPDATED: '1'
|
||||
SCOOP_BRANCH: develop
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Excavate
|
||||
uses: ScoopInstaller/GithubActions@5bceeda181721d9d10a18fdcc3ddca6f33467ae6 # v3.0.0
|
||||
env:
|
||||
SKIP_UPDATED: 1
|
||||
SCOOP_BRANCH: develop
|
||||
|
||||
23
.github/workflows/issue_comment.yml
vendored
23
.github/workflows/issue_comment.yml
vendored
@ -1,23 +0,0 @@
|
||||
name: Commented Pull Request
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [ created ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
pullRequestHandler:
|
||||
name: PullRequestHandler
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- name: PullRequestHandler
|
||||
uses: ScoopInstaller/GithubActions@main
|
||||
if: startsWith(github.event.comment.body, '/verify')
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SCOOP_BRANCH: develop
|
||||
19
.github/workflows/issues.yml
vendored
19
.github/workflows/issues.yml
vendored
@ -2,7 +2,7 @@ name: Issues
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [ opened, labeled ]
|
||||
types: [opened, labeled]
|
||||
|
||||
permissions:
|
||||
# Auto hash fixing commits
|
||||
@ -11,14 +11,13 @@ permissions:
|
||||
|
||||
jobs:
|
||||
issueHandler:
|
||||
name: IssueHandler
|
||||
name: Issue Handler
|
||||
if: github.event.action == 'opened' || (github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'verify'))
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- name: IssueHandler
|
||||
uses: ScoopInstaller/GithubActions@main
|
||||
if: github.event.action == 'opened' || (github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'verify'))
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SCOOP_BRANCH: develop
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Run Issue Handler
|
||||
uses: ScoopInstaller/GithubActions@5bceeda181721d9d10a18fdcc3ddca6f33467ae6 # v3.0.0
|
||||
env:
|
||||
SCOOP_BRANCH: develop
|
||||
|
||||
16
.github/workflows/lint-pr.yml
vendored
Normal file
16
.github/workflows/lint-pr.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
name: Lint Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, edited, synchronize]
|
||||
|
||||
permissions:
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
pr-title:
|
||||
name: Validate PR Title
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check PR Title
|
||||
uses: ScoopInstaller/GithubActions/lint-pr-title@5bceeda181721d9d10a18fdcc3ddca6f33467ae6 # v3.0.0
|
||||
20
.github/workflows/pull_request.yml
vendored
20
.github/workflows/pull_request.yml
vendored
@ -2,7 +2,9 @@ name: Pull Requests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [ opened ]
|
||||
types: [opened]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@ -10,13 +12,13 @@ permissions:
|
||||
|
||||
jobs:
|
||||
pullRequestHandler:
|
||||
name: PullRequestHandler
|
||||
name: Pull Request Handler
|
||||
if: github.event_name == 'pull_request' || (github.event.issue.pull_request && startsWith(github.event.comment.body, '/verify'))
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- name: PullRequestHandler
|
||||
uses: ScoopInstaller/GithubActions@main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SCOOP_BRANCH: develop
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Run Pull Request Handler
|
||||
uses: ScoopInstaller/GithubActions@5bceeda181721d9d10a18fdcc3ddca6f33467ae6 # v3.0.0
|
||||
env:
|
||||
SCOOP_BRANCH: develop
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user