-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade ci to use docker caching, apply pr labels, and lint pr …
…titles (#14)
- Loading branch information
1 parent
07ec423
commit 55c5beb
Showing
11 changed files
with
215 additions
and
38 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { RuleConfigSeverity } from '@commitlint/types'; | ||
|
||
export default { | ||
extends: ['@commitlint/config-conventional'], | ||
parserPreset: 'conventional-changelog-conventionalcommits', | ||
rules: { | ||
'scope-enum': [RuleConfigSeverity.Error, 'always', [ | ||
'', | ||
'deps', | ||
'controller-container', | ||
'guacamole-chart', | ||
'guacamole-crds-chart' | ||
]] | ||
} | ||
}; |
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 @@ | ||
# Release branches where trunk branches are merge-committed to trigger releases | ||
|
||
release: | ||
- base-branch: | ||
- 'main' | ||
- 'maintenance/.+/[0-9]+\.([0-9]+|x)\.x' | ||
|
||
# Label any maintenance branch, trunk and release | ||
|
||
maintenance: | ||
- base-branch: | ||
- 'maintenance/.+/[0-9]+\.([0-9]+|x)\.x' | ||
|
||
# Label PRs into the main branch | ||
|
||
main: | ||
- base-branch: | ||
- 'main' | ||
|
||
# Labels for PRs on asset specific branches | ||
|
||
controller-container: | ||
- base-branch: | ||
- '.+/controller-container(/.+)?' | ||
|
||
guacamole-chart: | ||
- base-branch: | ||
- '.+/guacamole-chart(/.+)?' | ||
|
||
guacamole-crds-chart: | ||
- base-branch: | ||
- '.+/guacamole-crds-chart(/.+)?' |
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,14 @@ | ||
## :construction: Suggest a change | ||
|
||
A clear and concise description of what you are changing. | ||
|
||
## :memo: Pre-merge checklist | ||
|
||
Ready to merge? Do not merge until all checks are satisfied. | ||
- [ ] :chart: Have all `required` CI checks passed on the most recent commit? | ||
- [ ] :black_nib: Is the PR title a valid and meaningful conventional-commit message? ie. `type(scope): summary` | ||
- [ ] :boom: Are `breaking changes` declared in the PR title in conventional-commit style? ie. `type!(scope): summary` | ||
- [ ] :art: Does new code follow the code style of this project? | ||
- [ ] :mag: Has new code been spellchecked and linted? | ||
- [ ] :book: Have docs been updated where necessary? | ||
- [ ] :poop: Have commits been checked for accidental file inclusions? |
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,42 @@ | ||
name: Controller Flake8 | ||
|
||
on: | ||
pull_request: | ||
# Ignore PRs on branches specifically intended for other assets | ||
branches-ignore: | ||
- '*/guacamole-chart*' | ||
- '*/guacamole-crds-chart*' | ||
# Only consider PRs that change files for this asset, including ci scripts | ||
paths: | ||
- '.github/workflows/flake8.yaml' | ||
- '.github/workflows/controller-container.yaml' | ||
- 'containers/controller/**' | ||
# Make sure all workflows that are "required checks" for a given | ||
# branch protection rule have the same paths: and branches-ignore: | ||
# filters. Otherwise, you can end up in a deadlock waiting on a | ||
# required check that will never be executed. | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
# This linting can be cancelled if there is a newer commit to lint | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
controller-flake8: | ||
runs-on: | ||
labels: [self-hosted, linux, x64] | ||
group: light | ||
|
||
steps: | ||
- name: clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: install flake8 | ||
run: pip install flake8 | ||
|
||
- name: install flake8 annotations | ||
uses: rbialon/flake8-annotations@v1 | ||
|
||
- name: run flake8 | ||
run: | | ||
flake8 --config=".github/.flake8" containers/controller/src |
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
name: Label PR | ||
|
||
on: | ||
pull_request: | ||
# Run on all PRs whenever they are opened | ||
types: | ||
- opened | ||
- reopened | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
# This labelling can be cancelled if there is a newer run | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pr-labeler: | ||
uses: SwanseaUniversityMedical/workflows/.github/workflows/[email protected] |
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,18 @@ | ||
name: Commit Lint PR Title | ||
|
||
on: | ||
pull_request: | ||
# Run on all PRs whenever the title could have changed | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
# This linting can be cancelled if there is a newer commit to lint | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pr-title-commitlint: | ||
uses: SwanseaUniversityMedical/workflows/.github/workflows/[email protected] |