Skip to content

Commit 229b6fd

Browse files
chore: sync files with stordco/common-config-elixir
1 parent b0fdb25 commit 229b6fd

File tree

8 files changed

+83
-12
lines changed

8 files changed

+83
-12
lines changed

.credo.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
# You can customize the priority of any check
8282
# Priority values are: `low, normal, high, higher`
8383
#
84-
{Credo.Check.Design.AliasUsage, [priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 2]},
84+
{Credo.Check.Design.AliasUsage, [priority: :low, if_nested_deeper_than: 4, if_called_more_often_than: 2]},
8585
{Credo.Check.Design.DuplicatedCode, false},
8686
# You can also customize the exit_status of each check.
8787
# If you don't want TODO comments to cause `mix credo` to fail, just

.github/pull_request_template.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Related Ticket(s)
2+
3+
<!--
4+
Enter the Jira issue below in the following format: PROJECT-##
5+
-->
6+
17
## Checklist
28

39
<!--

.github/release-please-config.json renamed to .github/release-please-config-stable.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"section": "Features",
88
"hidden": false
99
},
10+
{
11+
"type": "hotfix",
12+
"section": "Hotfixes",
13+
"hidden": true
14+
},
1015
{
1116
"type": "fix",
1217
"section": "Bug Fixes",
@@ -22,9 +27,7 @@
2227
"draft-pull-request": false,
2328
"packages": {
2429
".": {
25-
"extra-files": [
26-
"README.md"
27-
],
30+
"extra-files": ["README.md"],
2831
"release-type": "elixir"
2932
}
3033
},

.github/workflows/ci.yaml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
- id: changed
4848
name: Get Changed Files
49-
uses: tj-actions/changed-files@v43
49+
uses: tj-actions/changed-files@v44
5050
with:
5151
files_yaml: |
5252
database:
@@ -55,8 +55,14 @@ jobs:
5555
docker:
5656
- '.github/workflows/ci.yaml'
5757
- 'Dockerfile'
58+
documentation:
59+
- 'docs/**'
60+
- 'priv/documentation/**'
61+
- '**.ex'
62+
- '**.md'
5863
elixir:
5964
- '.github/workflows/ci.yaml'
65+
- '.tool-versions'
6066
- 'priv/**'
6167
- '**.ex'
6268
- '**.exs'
@@ -92,6 +98,9 @@ jobs:
9298
needs: [Changed]
9399
runs-on: ubuntu-latest
94100

101+
env:
102+
MIX_ENV: test
103+
95104
steps:
96105
- name: Checkout
97106
uses: actions/checkout@v4
@@ -128,7 +137,7 @@ jobs:
128137
run: mix dialyzer --format github
129138

130139
Documentation:
131-
if: ${{ !startsWith(github.head_ref, 'release-please--branches') && needs.Changed.outputs.elixir == 'true' }}
140+
if: ${{ !startsWith(github.head_ref, 'release-please--branches') && needs.Changed.outputs.documentation == 'true' }}
132141
needs: [Changed]
133142
runs-on: ubuntu-latest
134143

@@ -209,3 +218,32 @@ jobs:
209218
- elixir: 1.15
210219
otp: 26
211220

221+
Trivy_Filesystem:
222+
if: ${{ !startsWith(github.head_ref, 'release-please--branches') }}
223+
name: Trivy Filesystem Scan
224+
runs-on: ubuntu-latest
225+
226+
permissions:
227+
contents: read
228+
id-token: write
229+
pull-requests: write
230+
231+
steps:
232+
- name: Checkout
233+
uses: actions/checkout@v4
234+
235+
- name: Setup Elixir
236+
uses: stordco/actions-elixir/setup@v1
237+
with:
238+
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
239+
hex-token: ${{ secrets.HEX_API_KEY }}
240+
oban-fingerprint: ${{ secrets.OBAN_KEY_FINGERPRINT }}
241+
oban-token: ${{ secrets.OBAN_LICENSE_KEY }}
242+
243+
- name: Trivy Scan
244+
uses: stordco/actions-trivy@v1
245+
with:
246+
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
247+
scan-type: fs
248+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
249+

.github/workflows/pr.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
return;
3131
}
3232
33-
const REGEX = /^(feat!|fix!|fix|feat|chore|(fix|feat|chore)\(\w.*\)):\s(\[\w{1,8}-\d{1,8}\]|.*).*/;
33+
const REGEX = /^(feat!|fix!|hotfix!|fix|feat|chore|hotfix|(fix|feat|chore|hotfix)\(\w.*\)):\s(\[\w{1,8}-\d{1,8}\]|.*).*/;
3434
3535
if (!REGEX.test(title)) {
3636
core.setFailed("Pull request title does not follow conventional commits");
@@ -43,7 +43,10 @@ jobs:
4343
fix: [JIRA-1234] fix an existing feature
4444
feat: [JIRA-1234] a new feature to release
4545
feat!: a breaking change
46+
hotfix: needed in production immediately
4647
47-
Note: Adding ! (i.e. \`feat!:\`) represents a breaking change and will result in a SemVer major release.
48+
Adding ! (i.e. \`feat!:\`) represents a breaking change and will result in a SemVer major release.
49+
50+
Starting a commit with \`hotfix\` will result in a seperate hotfix release PR.
4851
`.trim());
4952
}

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ concurrency:
1212
cancel-in-progress: false
1313

1414
jobs:
15-
Please:
15+
Stable:
1616
runs-on: ubuntu-latest
1717

1818
steps:
1919
- id: release
2020
name: Release
21-
uses: google-github-actions/release-please-action@v4
21+
uses: googleapis/release-please-action@v4
2222
with:
23-
config-file: .github/release-please-config.json
23+
config-file: .github/release-please-config-stable.json
2424
manifest-file: .github/release-please-manifest.json
2525
target-branch: main
2626
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

.github/workflows/staging.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626

2727
runs-on: ubuntu-latest
2828

29+
env:
30+
MIX_ENV: test
31+
2932
steps:
3033
- name: Checkout
3134
uses: actions/checkout@v4
@@ -38,7 +41,7 @@ jobs:
3841
oban-fingerprint: ${{ secrets.OBAN_KEY_FINGERPRINT }}
3942
oban-token: ${{ secrets.OBAN_LICENSE_KEY }}
4043

41-
- name: Build
44+
- name: Docs
4245
run: mix docs
4346

4447
- name: Set CNAME

.trivy/fs-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This file is synced with stordco/common-config-elixir. Any changes will be overwritten.
2+
3+
exit-code: '1'
4+
format: 'json'
5+
output: 'trivy-fs-results.json'
6+
scanners:
7+
- vuln
8+
severity:
9+
- CRITICAL
10+
- HIGH
11+
- MEDIUM
12+
- LOW
13+
- UNKNOWN
14+
timeout: '3m'
15+
vulnerability:
16+
type:
17+
- os
18+
- library

0 commit comments

Comments
 (0)