Skip to content

Commit d66349c

Browse files
🩹[Patch]: Workflow improvements (#9)
This release makes significant changes to the project's GitHub workflows and configuration files, focusing on improving workflow security, updating dependencies, and streamlining release and linter processes. Key changes include replacing and renaming release workflows, pinning action versions for better security, disabling certain linter checks, and updating Dependabot settings. - Fixes #8 **Workflow and Release Management:** * Added a new `Release.yml` workflow to handle releases, replacing the previous `Auto-Release.yml` workflow which has been removed. The new workflow uses `PSModule/Release-GHRepository` and is triggered on pull requests affecting `action.yml`. * Removed the custom release configuration file `.github/release.yml`, which categorized and excluded certain changes from release notes. **Workflow Security and Maintenance:** * Updated workflow files to pin `actions/checkout` and `super-linter/super-linter` to specific commit SHAs for improved security and reproducibility. Also set `persist-credentials: false` to reduce token exposure risk. * Disabled `VALIDATE_BIOME_FORMAT` and `VALIDATE_JSCPD` in the linter workflow to streamline linting and removed the `.jscpd.json` configuration file. **Dependency Management:** * Updated Dependabot configuration to check for updates daily instead of weekly and introduced a cooldown period of 7 days between updates.
1 parent d86976e commit d66349c

File tree

8 files changed

+51
-69
lines changed

8 files changed

+51
-69
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.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
name: '${{ matrix.os }} - [${{ matrix.version }}]'
2828
steps:
2929
- name: Checkout repo
30-
uses: actions/checkout@v6
30+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31+
with:
32+
persist-credentials: false
3133

3234
- name: Action-Test
3335
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: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
permissions:
23+
contents: write
24+
pull-requests: write
25+
26+
jobs:
27+
Release:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout Code
31+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
32+
with:
33+
persist-credentials: false
34+
35+
- name: Release
36+
uses: PSModule/Release-GHRepository@88c70461c8f16cc09682005bcf3b7fca4dd8dc1a # v2.0.1
37+
env:
38+
GITHUB_TOKEN: ${{ github.token }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
2828
## Inputs
2929
30-
| Input | Required | Default | Description |
31-
| ------- | -------- | ------- | ----------- |
30+
| Input | Required | Default | Description |
31+
| ----- | -------- | ------- | ----------- |
3232
| `Version` | `false` | `latest` | Desired PowerShell Core version (e.g. `7.4.1`). Use `latest` to install the newest stable release. |
3333

3434
## Secrets

0 commit comments

Comments
 (0)