Skip to content

Commit 774b6f7

Browse files
🩹[Patch]: Workflow improvements (#18)
This release primarily updates and improves the workflows, focusing on enhanced security, reliability, and maintainability. Key changes include pinning all GitHub Action dependencies to specific commit SHAs, updating and renaming the release workflow, removing unused linter configuration, and refining scheduling and validation settings. **Workflow and Dependency Management Improvements:** * All GitHub Actions in workflow files (`Action-Test.yml`, `Linter.yml`, `Release.yml`) are now pinned to specific commit SHAs for improved security and reproducibility. * The release workflow was renamed from `.github/workflows/Auto-Release.yml` to `.github/workflows/Release.yml`, with corresponding job and step name updates, and now uses the `PSModule/Release-GHRepository` action instead of `PSModule/Auto-Release`. * The release workflow now triggers on `pull_request` events (instead of `pull_request_target`), and is further scoped to only run when files in `action.yml` or `src/**` are changed. **Linter and Validation Configuration:** * The unused `.github/linters/.jscpd.json` configuration file was removed, and JSCPD validation is now explicitly disabled in the linter workflow. * Additional linter validations (such as `VALIDATE_BIOME_FORMAT`) are now disabled to streamline linting. **Scheduling and Workflow Behavior:** * Dependabot update checks are now scheduled to run daily (instead of weekly), with a 7-day cooldown between updates. **Other Improvements:** * Minor improvements to the `action.yml` metadata, including a clearer description and updating the script path for the main PowerShell script.
1 parent 5156683 commit 774b6f7

File tree

7 files changed

+28
-26
lines changed

7 files changed

+28
-26
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/workflows/Action-Test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ jobs:
2323
steps:
2424
# Need to check out as part of the test, as its a local action
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: Get issue file content
2931
id: GetIssueFileContent
30-
uses: PSModule/GitHub-Script@v1
32+
uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10
3133
with:
3234
ShowOutput: true
3335
Script: |
@@ -40,6 +42,6 @@ jobs:
4042
IssueBody: ${{ fromJson(steps.GetIssueFileContent.outputs.result).issueFileContent }}
4143

4244
- name: Action-Test-Results
43-
uses: PSModule/Invoke-Pester@v4
45+
uses: PSModule/Invoke-Pester@882994cbe1ff07c3fc8afdac52404c940f99b331 # v4.2.2
4446
env:
4547
data: ${{ steps.Action-Test.outputs.data }}

.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
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Auto-Release
1+
name: Release
22

3-
run-name: "Auto-Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
3+
run-name: "Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
44

55
on:
6-
pull_request_target:
6+
pull_request:
77
branches:
88
- main
99
types:
@@ -12,6 +12,9 @@ on:
1212
- reopened
1313
- synchronize
1414
- labeled
15+
paths:
16+
- 'action.yml'
17+
- 'src/**'
1518

1619
concurrency:
1720
group: ${{ github.workflow }}-${{ github.ref }}
@@ -22,13 +25,15 @@ permissions:
2225
pull-requests: write # Required to create comments on the PRs
2326

2427
jobs:
25-
Auto-Release:
28+
Release:
2629
runs-on: ubuntu-latest
2730
steps:
2831
- name: Checkout Code
29-
uses: actions/checkout@v6
32+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
persist-credentials: false
3035

31-
- name: Auto-Release
32-
uses: PSModule/Auto-Release@v1
36+
- name: Release
37+
uses: PSModule/Release-GHRepository@88c70461c8f16cc09682005bcf3b7fca4dd8dc1a # v2.0.1
3338
env:
3439
GITHUB_TOKEN: ${{ github.token }}

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Get-IssueFormData
2-
description: Get the data from a issue that was generated based on a issue form
2+
description: Get the data from an issue that was generated based on an issue form
33
author: PSModule
44
branding:
55
icon: upload-cloud
@@ -21,12 +21,12 @@ runs:
2121
steps:
2222
- name: Get-IssueFormData
2323
id: Get-IssueFormData
24-
uses: PSModule/GitHub-Script@v1
24+
uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10
2525
env:
2626
GITHUB_ACTION_INPUT_IssueBody: ${{ inputs.IssueBody }}
2727
with:
2828
Token: ''
2929
ShowOutput: true
3030
Script: |
3131
# Get-IssueFormData
32-
${{ github.action_path }}/scripts/main.ps1
32+
${{ github.action_path }}/src/main.ps1
File renamed without changes.

0 commit comments

Comments
 (0)