Skip to content

Commit 26f5302

Browse files
🩹[Patch]: Workflow improvements (#39)
This release makes several updates to the GitHub Actions configuration, focusing on improving workflow reliability, release management, and linter settings. It also removes obsolete configuration files and fixes minor documentation errors. The most important changes are grouped below: **Release and Workflow Improvements:** * Added a new `Release.yml` workflow that triggers on relevant pull request events and uses the `PSModule/Release-GHRepository` action for managing releases, replacing the previous `Auto-Release.yml` workflow, which has been removed. This change also introduces path-based filtering to only trigger releases for changes to `action.yml` and `src/**`. * Updated the `Action-Test.yml` and `Linter.yml` workflows to use pinned versions of actions (by commit SHA) for improved security and reliability, and set `persist-credentials: false` during checkout. * Updated the linter step to use a specific version of `super-linter` and disabled certain validations for performance and relevance. **Dependency and Automation Configuration:** * Changed the Dependabot update schedule from weekly to daily and introduced a cooldown period to reduce noise from frequent updates. **Code and Documentation Clean-up:** * Removed the `.jscpd.json` linter configuration file and the `.github/release.yml` release notes configuration, streamlining configuration management. * Fixed typos and improved naming consistency in `README.md`. * Updated references in `action.yml` to use pinned action versions and corrected the script path from `scripts/main.ps1` to `src/main.ps1`.
1 parent 0629f92 commit 26f5302

File tree

10 files changed

+55
-71
lines changed

10 files changed

+55
-71
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 & 10 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: 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@88c70461c8f16cc09682005bcf3b7fca4dd8dc1a # v2.0.1
38+
with:
39+
IncrementalPrerelease: false

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ This GitHub Action is a part of the [PSModule framework](https://github.com/PSMo
66

77
## Specifications and practices
88

9-
Initiate-PSModule follows:
9+
Initialize-PSModule follows:
1010

1111
- [SemVer 2.0.0 specifications](https://semver.org)
1212
- [GitHub Flow specifications](https://docs.github.com/en/get-started/using-github/github-flow)
13-
- [Continiuous Delivery practices](https://en.wikipedia.org/wiki/Continuous_delivery)
13+
- [Continuous Delivery practices](https://en.wikipedia.org/wiki/Continuous_delivery)
1414

1515
... and supports the following practices in the PSModule framework:
1616

@@ -40,7 +40,7 @@ The Initialize-PSModule action will prepare the runner for the PSModule framewor
4040
| `Verbose` | Enable verbose output. | `false` | `'false'` |
4141
| `Version` | Specifies the version of the GitHub module to be installed. The value must be an exact version. | `false` | |
4242
| `Prerelease` | Allow prerelease versions if available. | `false` | `'false'` |
43-
| `WorkingDirectory` | The working directory where the script runs. | `false` | `${{ github.workspace }}` |
43+
| `WorkingDirectory` | The working directory where the script runs. | `false` | `${{ github.workspace }}` |
4444

4545
## Example
4646

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ runs:
3030
using: composite
3131
steps:
3232
- name: Initialize-PSModule
33-
uses: PSModule/GitHub-Script@v1
33+
uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10
3434
with:
3535
Debug: ${{ inputs.Debug }}
3636
Prerelease: ${{ inputs.Prerelease }}
@@ -39,4 +39,4 @@ runs:
3939
WorkingDirectory: ${{ inputs.WorkingDirectory }}
4040
Script: |
4141
# Initialize-PSModule
42-
${{ github.action_path }}/scripts/main.ps1
42+
${{ github.action_path }}/src/main.ps1
File renamed without changes.

0 commit comments

Comments
 (0)