Skip to content

Commit ae0ad1b

Browse files
🩹 [Patch]: Standardize workflows with SHA pinning and daily Dependabot (#123)
Improves dependency management by configuring Dependabot to check daily while preventing excessive update noise through a 7-day cooldown period. This ensures timely security updates while reducing PR churn. - Related to PSModule workflow standardization ## Dependabot configuration Changed the update schedule from weekly to daily with a 7-day cooldown period. This provides faster detection of security vulnerabilities while avoiding duplicate PRs for the same dependency within a week. ```yaml schedule: interval: daily cooldown: default-days: 7 ``` ## Release configuration cleanup Removed the deprecated `.github/release.yml` file as release notes are now managed through the Auto-Release action's automated process. ## Action pinning Pinned all GitHub Actions to specific commit SHAs for improved security and reproducibility: - `actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd` (v6.0.2) - `actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4` (v5.0.0) - `super-linter/super-linter@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99` (v8.3.2) - `PSModule/Auto-Release@eabd533035e2cb9822160f26f2eda584bd012356` (v1.9.5) - `PSModule/Install-PSModuleHelpers@d60d63e4be477d1ca0c67c6085101fb109bce8f1` (v1.0.6)
1 parent fe8cc14 commit ae0ad1b

22 files changed

+59
-73
lines changed

‎.github/dependabot.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ updates:
1111
- dependencies
1212
- github-actions
1313
schedule:
14-
interval: weekly
14+
interval: daily
15+
cooldown:
16+
default-days: 7

‎.github/linters/.jscpd.json‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎.github/release.yml‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎.github/workflows/Action-Test.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout repo
26-
uses: actions/checkout@v6
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
with:
28+
persist-credentials: false
2729

2830
- name: Action-Test
2931
uses: ./
@@ -37,7 +39,9 @@ jobs:
3739
runs-on: ubuntu-latest
3840
steps:
3941
- name: Checkout repo
40-
uses: actions/checkout@v6
42+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43+
with:
44+
persist-credentials: false
4145

4246
- name: Action-Test
4347
uses: ./
@@ -51,7 +55,9 @@ jobs:
5155
runs-on: ubuntu-24.04
5256
steps:
5357
- name: Checkout repo
54-
uses: actions/checkout@v6
58+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
59+
with:
60+
persist-credentials: false
5561

5662
- name: Action-Test
5763
uses: ./

‎.github/workflows/Auto-Release.yml‎

Lines changed: 0 additions & 34 deletions
This file was deleted.

‎.github/workflows/Linter.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout repo
22-
uses: actions/checkout@v6
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
with:
2424
fetch-depth: 0
25+
persist-credentials: false
2526

2627
- name: Lint code base
27-
uses: super-linter/super-linter@latest
28+
uses: super-linter/super-linter@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99 # v8.3.2
2829
env:
2930
GITHUB_TOKEN: ${{ github.token }}
31+
VALIDATE_BIOME_FORMAT: false
32+
VALIDATE_JSCPD: false
3033
VALIDATE_JSON_PRETTIER: false
3134
VALIDATE_MARKDOWN_PRETTIER: false
3235
VALIDATE_YAML_PRETTIER: false
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
run-name: "Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- main
9+
types:
10+
- closed
11+
- opened
12+
- reopened
13+
- synchronize
14+
- labeled
15+
paths:
16+
- 'action.yml'
17+
- 'src/**'
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: write
25+
pull-requests: write
26+
27+
jobs:
28+
Release:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout Code
32+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
persist-credentials: false
35+
36+
- name: Release
37+
uses: PSModule/Auto-Release@eabd533035e2cb9822160f26f2eda584bd012356 # v1.9.5
38+
with:
39+
IncrementalPrerelease: false

‎action.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runs:
1919
using: composite
2020
steps:
2121
- name: Install-PSModuleHelpers
22-
uses: PSModule/Install-PSModuleHelpers@v1
22+
uses: PSModule/Install-PSModuleHelpers@d60d63e4be477d1ca0c67c6085101fb109bce8f1 # v1.0.6
2323

2424
- name: Run Build-PSModule
2525
shell: pwsh
@@ -29,10 +29,10 @@ runs:
2929
PSMODULE_BUILD_PSMODULE_INPUT_Name: ${{ inputs.Name }}
3030
run: |
3131
# Build-PSModule
32-
${{ github.action_path }}/scripts/main.ps1
32+
${{ github.action_path }}/src/main.ps1
3333
3434
- name: Upload module artifact
35-
uses: actions/upload-artifact@v5
35+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
3636
with:
3737
name: ${{ inputs.ArtifactName }}
3838
path: ${{ steps.build.outputs.ModuleOutputFolderPath }}
File renamed without changes.

0 commit comments

Comments
 (0)