Skip to content

Commit

Permalink
[#495] Add dependabot.yml with GitHub Actions (#559)
Browse files Browse the repository at this point in the history
Resolves #495
  • Loading branch information
chshersh authored Jan 11, 2022
1 parent b8bf784 commit 31b10b9
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ The changelog is available [on GitHub][2].
* [#517](https://github.com/kowainik/summoner/issues/517):
Switch to `main` initial branch when creating project.
* Require `git >= 2.28` for `--initial-branch=main` option.
* [#491](https://github.com/kowainik/summoner/issues/491):
* [#340](https://github.com/kowainik/summoner/issues/340):
Use `cabal` version `3.0`.
* [#495](https://github.com/kowainik/summoner/issues/495):
Generate `dependabot.yml` to update GitHub Actions automatically.
* __#TUI__ Upgrade `brick` allowed version. Bump up lower
bound to `0.56` due to the new field `formFieldUpdate`
addition to the `FormFieldState` data type.
Expand Down
11 changes: 11 additions & 0 deletions summoner-cli/examples/cabal-full/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "GA"
include: "scope"
labels:
- "CI"
- "dependencies"
11 changes: 11 additions & 0 deletions summoner-cli/examples/full-batteries/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "GA"
include: "scope"
labels:
- "CI"
- "dependencies"
11 changes: 11 additions & 0 deletions summoner-cli/examples/stack-full/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "GA"
include: "scope"
labels:
- "CI"
- "dependencies"
22 changes: 21 additions & 1 deletion summoner-cli/src/Summoner/Template/GitHub.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ import Summoner.Tree (TreeFs (..))
gitHubFiles :: Settings -> [TreeFs]
gitHubFiles Settings{..} = concat
[ [File ".gitignore" (gitignoreDefault <> gitignoreCustom) | settingsGitHub]
, [Dir ".github" [ Dir "workflows" [ File "ci.yml" ghActionsYml ]] | settingsGhActions ]
, [ Dir ".github"
[ Dir "workflows" [ File "ci.yml" ghActionsYml ]
, File "dependabot.yml" dependabotYml
]
| settingsGhActions
]
, [File ".travis.yml" travisYml | settingsTravis]
, [File "appveyor.yml" appVeyorYml | settingsAppVeyor]
]
Expand Down Expand Up @@ -248,6 +253,21 @@ gitHubFiles Settings{..} = concat
" exclude:"
: map (indent 10 <>) xs

dependabotYml :: Text
dependabotYml = unlines
[ "updates:"
, " - package-ecosystem: \"github-actions\""
, " directory: \"/\""
, " schedule:"
, " interval: \"daily\""
, " commit-message:"
, " prefix: \"GA\""
, " include: \"scope\""
, " labels:"
, " - \"CI\""
, " - \"dependencies\""
]

-- create travis.yml template
travisYml :: Text
travisYml = unlines $
Expand Down

0 comments on commit 31b10b9

Please sign in to comment.