Skip to content

Commit

Permalink
AAE-15950: allow validating dependabot PRs with label 'CI' (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
atchertchian authored Aug 8, 2023
1 parent 014b8fe commit 4b1d815
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 27 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

16 changes: 14 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ on:
pull_request:
branches:
- develop

# Allows to run this workflow manually from the Actions tab
types:
- opened
- reopened
- synchronize
- labeled
workflow_dispatch:

env:
Expand All @@ -21,7 +24,16 @@ env:
HELM_REPO_SUBFOLDER: .

jobs:

check-ext-build:
name: Check dependabot/external build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Activiti/Activiti/.github/actions/[email protected]

pre-commit:
needs: check-ext-build
runs-on: ubuntu-latest
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
Expand Down
28 changes: 16 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.11.0
rev: v1.11.1
hooks:
- id: helm-docs
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.18
rev: v0.1.22
hooks:
- id: helmlint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.4.0
hooks:
- id: check-yaml
args: [--allow-multiple-documents]
exclude: charts/.*/templates
- id: check-merge-conflict
- id: fix-byte-order-marker
- id: mixed-line-ending
args: ['--fix=lf']
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
args: [--allow-multiple-documents]
exclude: charts/.*/templates
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.1
hooks:
- id: prettier
types_or:
- markdown
exclude: charts/.*/README.md
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.21.0
rev: 0.23.3
hooks:
- id: check-dependabot
- id: check-github-actions
- id: check-github-workflows
- id: check-jsonschema
alias: check-dependabot
name: "Validate Dependabot Config"
files: '.github/dependabot\.yml$'
args: ["--schemafile", "https://json.schemastore.org/dependabot-2.0.json"]
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This chart is meant to be used as a dependency in a larger application chart, fo
```
A minimum amount of value overrides must be provided:
```yaml
my-service:
enabled: true
Expand All @@ -30,3 +31,29 @@ my-service:
```
More details on available properties and globals can be found in [README.md](./charts/common/README.md).
## CI/CD
Running on GH Actions.
For Dependabot PRs to be validated by CI, the label "CI" should be added to the PR.
Requires the following secrets to be set:
| Name | Description |
| ---------------------------- | ---------------------------------- |
| BOT_GITHUB_TOKEN | Token to launch other builds on GH |
| BOT_GITHUB_USERNAME | Username to issue propagation PRs |
| SLACK_NOTIFICATION_BOT_TOKEN | Token to notify slack on failure |
## Formatting
The local `.editorconfig` file is leveraged for automated formatting.

See documentation at [pre-commit](https://github.com/Alfresco/alfresco-build-tools/tree/master/docs#pre-commit).

To run all hooks locally:

```sh
pre-commit run -a
```

0 comments on commit 4b1d815

Please sign in to comment.