Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 39 additions & 28 deletions .github/workflows/Action-Test.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
name: Action-Test

run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"

on: [pull_request]

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: ./
with:
working-directory: ./tests
subject: PSModule
name: Action-Test

run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"

on: [pull_request]

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: ./
with:
script: |
LogGroup "Test-PSModule" {
Get-GitHubZen
}

- name: Action-Test 2
uses: ./
with:
Verbose: true
script: |
LogGroup "Test-PSModule" {
Get-GitHubZen
}
34 changes: 0 additions & 34 deletions .github/workflows/Auto-Configure.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/Auto-Document.yml

This file was deleted.

68 changes: 34 additions & 34 deletions .github/workflows/Auto-Release.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: Auto-Release
run-name: "Auto-Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
on:
pull_request_target:
branches:
- main
types:
- closed
- opened
- reopened
- synchronize
- labeled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write # Required to create releases
pull-requests: write # Required to create comments on the PRs
jobs:
Auto-Release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Auto-Release
uses: PSModule/Auto-Release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
name: Auto-Release

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

on:
pull_request_target:
branches:
- main
types:
- closed
- opened
- reopened
- synchronize
- labeled

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write # Required to create releases
pull-requests: write # Required to create comments on the PRs

jobs:
Auto-Release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Auto-Release
uses: PSModule/Auto-Release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
60 changes: 31 additions & 29 deletions .github/workflows/Linter.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
name: Linter

run-name: "Linter - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
packages: read
statuses: write

jobs:
Lint:
name: Lint code base
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint code base
uses: super-linter/super-linter/slim@latest
env:
GITHUB_TOKEN: ${{ github.token }}
name: Linter

run-name: "Linter - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
packages: read
statuses: write

jobs:
Lint:
name: Lint code base
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint code base
uses: super-linter/super-linter/slim@latest
env:
GITHUB_TOKEN: ${{ github.token }}
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,47 @@
# Template-action
# GitHub-Script

A template repository for GitHub Actions
A GitHub Action used for running a PowerShell Script that uses the GitHub PowerShell module

## Usage

### Inputs

### Secrets
| Name | Description | Required | Default |
| - | - | - | - |
| `Script` | The script to run | true | |
| `Token` | The GitHub token to use | false | ${{ github.token }} |
| `Debug` | Enable debug output | false | 'false' |
| `Verbose` | Enable verbose output | false | 'false' |
| `Version` | The version of the GitHub module to install | false | 'latest' |
| `Prerelease` | Allow prerelease versions if available | false | 'false' |
| `WorkingDirectory` | The working directory where the script will run from | false | ${{ github.workspace }} |

### Outputs
<!--
Token
JWT
AppID
Repos
Organization
Host -> github.com, *.ghe.com
-->

<!-- ### Secrets -->

<!--
Token
JWT
-->

<!-- ### Outputs -->

### Example

```yaml
Example here
```

### Similar projects

- [actions/create-github-app-token](https://github.com/actions/create-github-app-token) -> Functionality will be brought into GitHub PowerShell module.
- [actions/github-script](https://github.com/actions/github-script)
- [PSModule/GitHub](https://github.com/PSModule/GitHub)
Loading