Skip to content

Action-Test - [ #] by @MariusStorhaug #85

Action-Test - [ #] by @MariusStorhaug

Action-Test - [ #] by @MariusStorhaug #85

Workflow file for this run

name: Action-Test
run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
jobs:
ActionTestBasic:
name: Action-Test - [Basic]
runs-on: ubuntu-latest
steps:
# Need to check out as part of the test, as its a local action
- name: Checkout repo
uses: actions/checkout@v4
- name: Action-Test
uses: ./
ActionTestWithScript:
name: Action-Test - [WithScript]
runs-on: ubuntu-latest
steps:
# Need to check out as part of the test, as its a local action
- name: Checkout repo
uses: actions/checkout@v4
- name: Action-Test
uses: ./
with:
Script: |
LogGroup 'Get-GitHubContext' {
Get-GitHubContext
}
LogGroup 'Get-GitHubZen' {
Get-GitHubZen
}
ActionTestWithoutToken:
name: Action-Test - [WithoutToken]
runs-on: ubuntu-latest
steps:
# Need to check out as part of the test, as its a local action
- name: Checkout repo
uses: actions/checkout@v4
- name: Action-Test
uses: ./
with:
Token: ''
Script: |
LogGroup 'Get-GitHubContext' {
Get-GitHubContext
}
LogGroup 'My group' {
'This is a group'
}
ActionTestWithPAT:
name: Action-Test - [WithPAT]
runs-on: ubuntu-latest
steps:
# Need to check out as part of the test, as its a local action
- name: Checkout repo
uses: actions/checkout@v4
- name: Action-Test
uses: ./
with:
Token: ${{ secrets.TEST_PAT }}
Script: |
LogGroup 'Get-GitHubContext' {
Get-GitHubContext
}
LogGroup 'Get-GitHubUser' {
Get-GitHubUser
}
ActionTestWithFGPAT:
name: Action-Test - [WithFGPAT]
runs-on: ubuntu-latest
steps:
# Need to check out as part of the test, as its a local action
- name: Checkout repo
uses: actions/checkout@v4
- name: Action-Test
uses: ./
with:
Token: ${{ secrets.TEST_FG_PAT }}
Script: |
LogGroup 'Get-GitHubContext' {
Get-GitHubContext
}
LogGroup 'Get-GitHubUser' {
Get-GitHubUser
}
ActionTestWithGitHubApp:
name: Action-Test - [GitHubApp]
runs-on: ubuntu-latest
steps:
# Need to check out as part of the test, as its a local action
- name: Checkout repo
uses: actions/checkout@v4
- name: Action-Test
uses: ./
with:
ClientID: ${{ secrets.TEST_APP_CLIENT_ID }}
PrivateKey: ${{ secrets.TEST_APP_PRIVATE_KEY }}
Script: |
LogGroup 'Get-GitHubContext' {
Get-GitHubContext
}
LogGroup 'Get-GitHubApp' {
Get-GitHubApp
}
LogGroup 'Get-GitHubAppInstallation' {
Get-GitHubAppInstallation
}
LogGroup 'Do something as an installation' {
Get-GithubAppInstallation | New-GitHubAppInstallationAccessToken | ForEach-Object {
Connect-GitHub -Token $_.token
}
}