-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from defenseunicorns/add-common-workflows
chore: add common workflows for reuse across repos
- Loading branch information
Showing
13 changed files
with
159 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: clean-runner | ||
description: "Free GH Runner Space" | ||
description: Free GH Runner Space | ||
|
||
runs: | ||
using: composite | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Metadata | ||
|
||
on: | ||
# This workflow is triggered on pull requests to the main branch. | ||
pull_request: | ||
branches: [main] | ||
types: [opened, edited, synchronize] | ||
|
||
# This allows other repositories to call this workflow in a reusable way | ||
workflow_call: | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
name: Validate PR Title | ||
permissions: | ||
pull-requests: read # Allows reading pull request metadata. | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 | ||
|
||
- name: Install commitlint | ||
run: | | ||
npm install --save-dev @commitlint/config-conventional@18.6.0 | ||
npm install --save-dev @commitlint/cli@18.6.0 | ||
- name: Lint PR title | ||
env: | ||
pull_request_title: ${{ github.event.pull_request.title }} | ||
run: | | ||
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js | ||
echo "$pull_request_title" | npx commitlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Scan | ||
|
||
on: | ||
# This workflow is triggered on pull requests to the main branch. | ||
pull_request: | ||
|
||
# This allows other repositories to call this workflow in a reusable way | ||
workflow_call: | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
name: Lint | ||
permissions: | ||
contents: read # Allows reading the repo contents | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Environment setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install lint deps | ||
run: | | ||
uds run install-deps | ||
- name: Lint the repository | ||
run: | | ||
uds run lint-all |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
yaml-files: | ||
- "**/*.y*ml" | ||
- .yamllint | ||
|
||
rules: | ||
anchors: enable | ||
braces: enable | ||
brackets: enable | ||
colons: enable | ||
commas: enable | ||
comments: | ||
level: warning | ||
comments-indentation: | ||
level: warning | ||
document-end: disable | ||
document-start: | ||
level: warning | ||
empty-lines: enable | ||
empty-values: disable | ||
float-values: disable | ||
hyphens: enable | ||
indentation: enable | ||
key-duplicates: enable | ||
key-ordering: disable | ||
line-length: disable | ||
new-line-at-end-of-file: enable | ||
new-lines: enable | ||
octal-values: disable | ||
quoted-strings: | ||
required: only-when-needed | ||
quote-type: double | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
tasks: | ||
- name: deps | ||
description: Install linting tool dependencies | ||
actions: | ||
- description: | ||
cmd: pip install yamllint | ||
|
||
- name: yaml | ||
description: Run YAML linting checks | ||
actions: | ||
# requires yamllint to be installed either from pip or brew | ||
- description: Lint YAML files | ||
cmd: yamllint . -c .yamllint --no-warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters