Skip to content

Commit 71643ce

Browse files
committed
Add PR Dependency check workflow
1 parent 61db691 commit 71643ce

3 files changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Check for Dependencies in PR
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
issues: read
8+
pull-requests: read
9+
10+
jobs:
11+
check_dependencies:
12+
runs-on: ubuntu-latest
13+
name: "Check GitHub Actions Dependencies"
14+
steps:
15+
- uses: gregsdennis/dependencies-action@1.4.0
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Check for Dependencies in PR
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, edited, reopened, labeled, unlabeled, synchronize]
6+
7+
permissions:
8+
issues: read
9+
pull-requests: read
10+
11+
jobs:
12+
github_actiion_pr_dependency_check:
13+
name: GitHub Action Dependency Check
14+
uses: ./.github/workflows/github_actions_dependencies.yml

docs/pr-dependency-workflow.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# PR Dependency Workflow Documentation
2+
3+
## Overview
4+
5+
The [`github_actions_dependencies.yml`](.github/workflows/github_actions_dependencies.yml) workflow uses [a third party GitHub action](https://github.com/marketplace/actions/pr-dependency-check) to enforce PR dependencies.
6+
7+
At the time of writing, the GitHub action supported the following styles, for both issues and PRs.:
8+
9+
- Quick Link: `#5`
10+
- Partial Link: `gregsdennis/dependencies-action#5`
11+
- Partial URL: `gregsdennis/dependencies-action/pull/5`
12+
- Full URL: `https://github.com/gregsdennis/dependencies-action/pull/5`
13+
- Markdown: `[markdown link](https://github.com/gregsdennis/dependencies-action/pull/5)`
14+
15+
## Usage
16+
17+
Add the following to a `.yaml` file in your `.github/workflows` directory:
18+
19+
```
20+
name: Check for GitHub Actions Dependencies in PR
21+
22+
on:
23+
pull_request_target:
24+
types: [opened, edited, reopened, labeled, unlabeled, synchronize]
25+
26+
permissions:
27+
issues: read
28+
pull-requests: read
29+
30+
jobs:
31+
check_dependencies:
32+
uses: swiftlang/github-workflows/.github/workflows/github_actions_dependencies.yml.yml@<to-be-updated>
33+
```

0 commit comments

Comments
 (0)