Skip to content

Commit d4d6d1d

Browse files
🩹[Patch]: Workflow improvements (#106)
This release makes several updates to the project's GitHub workflows and configuration files, focusing on improving reliability, security, and maintainability. Key changes include pinning GitHub Action dependencies to specific commit hashes, updating workflow schedules and cooldowns, removing or replacing configuration files for release and linters, and updating references to scripts and modules for better consistency. **GitHub Actions and Workflow Improvements:** * All workflows now pin the `actions/checkout` and other GitHub Actions to specific commit SHAs for improved security and reproducibility, and set `persist-credentials: false` to enhance security. * Updated the linter workflow to use a specific version of `super-linter`, and disabled certain validations for improved performance and compatibility. **Release Process Updates:** * Removed the old `Auto-Release.yml` workflow and replaced it with a new `Release.yml` workflow that uses a different release action and is triggered on pull requests affecting release-relevant files. * Deleted the `.github/release.yml` configuration for auto-generated release notes, centralizing release configuration in the workflow. **Configuration and Scheduling Changes:** * Changed the Dependabot update schedule from weekly to daily, and introduced a 7-day cooldown to avoid excessive update PRs. * Removed the `.github/linters/.jscpd.json` configuration file, likely because duplicate code detection is now disabled or managed elsewhere. **Script and Module Reference Updates:** * Updated references in `action.yml` to use specific commit SHAs for external modules and changed script paths from `scripts/main.ps1` to `src/main.ps1` for consistency.
1 parent 7d94ed7 commit d4d6d1d

17 files changed

+59
-72
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 & 11 deletions
This file was deleted.

.github/release.yml

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

.github/workflows/Action-Test-Src-Default.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525
steps:
2626
- name: Checkout repo
27-
uses: actions/checkout@v6
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
persist-credentials: false
2830

2931
- name: Action-Test
3032
uses: ./

.github/workflows/Action-Test-Src-WithManifest.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525
steps:
2626
- name: Checkout repo
27-
uses: actions/checkout@v6
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
persist-credentials: false
2830

2931
- name: Action-Test
3032
uses: ./

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525
steps:
2626
- name: Checkout repo
27-
uses: actions/checkout@v6
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
persist-credentials: false
2830

2931
- name: Action-Test
3032
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

.github/workflows/Release.yml

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/Release-GHRepository@5a5165d66f485d1aad217ef34a190178b214fdcb # v2.0.2
38+
with:
39+
IncrementalPrerelease: false

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ runs:
267267
using: composite
268268
steps:
269269
- name: Install-PSModuleHelpers
270-
uses: PSModule/Install-PSModuleHelpers@v1
270+
uses: PSModule/Install-PSModuleHelpers@ed79b6e3aa8c9cd3d30ab2bf02ea6bd4687b9c74 # v1.0.7
271271

272272
- name: Get test paths
273273
shell: pwsh
@@ -278,10 +278,10 @@ runs:
278278
PSMODULE_TEST_PSMODULE_INPUT_Settings: ${{ inputs.Settings }}
279279
run: |
280280
# Get test paths
281-
${{ github.action_path }}/scripts/main.ps1
281+
${{ github.action_path }}/src/main.ps1
282282
283283
- name: Invoke-Pester
284-
uses: PSModule/Invoke-Pester@v4
284+
uses: PSModule/Invoke-Pester@1fcb663c0efe914e8374d78e16aa7bb907ea2434 # v4.2.3
285285
id: test
286286
env:
287287
LocalTestPath: ${{ steps.paths.outputs.LocalTestPath }}

0 commit comments

Comments
 (0)