Skip to content

Commit 7120d0c

Browse files
🪲 [Fix]: Fix issue with parameters and GitHub token access (#172)
## Description This pull request updates several GitHub Actions workflows to simplify input parameters and improve artifact handling. Key changes include the removal of unused parameters (`Debug`, `Verbose`, `Version`, and `Prerelease`) and the addition of an `ArtifactName` parameter for uploading artifacts. Additionally, environment variables are introduced for authentication. ### Simplification of input parameters: * [`.github/workflows/Build-Module.yml`](diffhunk://#diff-288da0616802a69b7e5aa63f771fe1525eda2ec5b576e26423f28380b2e68833L10-R14): Removed unused parameters (`Debug`, `Verbose`, `Version`, and `Prerelease`) and added a new `ArtifactName` parameter to specify the name of the artifact to upload. [[1]](diffhunk://#diff-288da0616802a69b7e5aa63f771fe1525eda2ec5b576e26423f28380b2e68833L10-R14) [[2]](diffhunk://#diff-288da0616802a69b7e5aa63f771fe1525eda2ec5b576e26423f28380b2e68833L51-R38) ### Environment variable addition: * [`.github/workflows/Build-Module.yml`](diffhunk://#diff-288da0616802a69b7e5aa63f771fe1525eda2ec5b576e26423f28380b2e68833R28-R29): Added the `GH_TOKEN` environment variable for authentication using GitHub's token. ### Consistency across workflows: * `.github/workflows/CI.yml` and `.github/workflows/workflow.yml`: Removed references to unused parameters (`Debug`, `Verbose`, `Version`, and `Prerelease`) to align with the updated `Build-Module.yml`. [[1]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L90-L93) [[2]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1L92-L95) ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent f1008b1 commit 7120d0c

File tree

3 files changed

+6
-30
lines changed

3 files changed

+6
-30
lines changed

.github/workflows/Build-Module.yml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,11 @@ on:
77
type: string
88
description: The name of the module to process. Scripts default to the repository name if nothing is specified.
99
required: false
10-
Debug:
11-
type: boolean
12-
description: Enable debug output.
13-
required: false
14-
default: false
15-
Verbose:
16-
type: boolean
17-
description: Enable verbose output.
18-
required: false
19-
default: false
20-
Version:
10+
ArtifactName:
2111
type: string
22-
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
23-
required: false
24-
default: ''
25-
Prerelease:
26-
type: boolean
27-
description: Whether to use a prerelease version of the 'GitHub' module.
12+
description: Name of the artifact to upload.
2813
required: false
29-
default: false
14+
default: module
3015
WorkingDirectory:
3116
type: string
3217
description: The working directory where the script will run from.
@@ -40,6 +25,8 @@ jobs:
4025
Build-Module:
4126
name: Build-Module
4227
runs-on: ubuntu-latest
28+
env:
29+
GH_TOKEN: ${{ github.token }}
4330
steps:
4431
- name: Checkout Code
4532
uses: actions/checkout@v4
@@ -48,8 +35,5 @@ jobs:
4835
uses: PSModule/Build-PSModule@v4
4936
with:
5037
Name: ${{ inputs.Name }}
51-
Debug: ${{ inputs.Debug }}
52-
Prerelease: ${{ inputs.Prerelease }}
53-
Verbose: ${{ inputs.Verbose }}
54-
Version: ${{ inputs.Version }}
38+
ArtifactName: ${{ inputs.ArtifactName }}
5539
WorkingDirectory: ${{ inputs.WorkingDirectory }}

.github/workflows/CI.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ jobs:
8787
- Get-Settings
8888
with:
8989
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
90-
Debug: ${{ inputs.Debug }}
91-
Prerelease: ${{ inputs.Prerelease }}
92-
Verbose: ${{ inputs.Verbose }}
93-
Version: ${{ inputs.Version }}
9490
WorkingDirectory: ${{ inputs.WorkingDirectory }}
9591

9692
Build-Docs:

.github/workflows/workflow.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ jobs:
8989
- Get-Settings
9090
with:
9191
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
92-
Debug: ${{ inputs.Debug }}
93-
Prerelease: ${{ inputs.Prerelease }}
94-
Verbose: ${{ inputs.Verbose }}
95-
Version: ${{ inputs.Version }}
9692
WorkingDirectory: ${{ inputs.WorkingDirectory }}
9793

9894
Build-Docs:

0 commit comments

Comments
 (0)