Skip to content

Commit 6673bb3

Browse files
🩹 [Patch]: Add a test for Fine-Grained PAT (#10)
## Description - Add a test for Fine-Grained PAT ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [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 174cd64 commit 6673bb3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/Action-Test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,27 @@ jobs:
9090
Get-GitHubUser
9191
}
9292
93+
ActionTestWithFGPAT:
94+
name: Action-Test - [WithFGPAT]
95+
runs-on: ubuntu-latest
96+
steps:
97+
# Need to check out as part of the test, as its a local action
98+
- name: Checkout repo
99+
uses: actions/checkout@v4
100+
101+
- name: Action-Test
102+
uses: ./
103+
with:
104+
Token: ${{ secrets.TEST_FG_PAT }}
105+
Script: |
106+
LogGroup 'Get-GitHubContext' {
107+
Get-GitHubContext
108+
}
109+
110+
LogGroup 'Get-GitHubUser' {
111+
Get-GitHubUser
112+
}
113+
93114
ActionTestWithGitHubApp:
94115
name: Action-Test - [GitHubApp]
95116
runs-on: ubuntu-latest
@@ -115,3 +136,9 @@ jobs:
115136
LogGroup 'Get-GitHubAppInstallation' {
116137
Get-GitHubAppInstallation
117138
}
139+
140+
LogGroup 'Do something as an installation' {
141+
Get-GithubAppInstallation | New-GitHubAppInstallationAccessToken | ForEach-Object {
142+
Connect-GitHub -Token $_.token
143+
}
144+
}

0 commit comments

Comments
 (0)