Skip to content

Commit 5db2ae2

Browse files
Initial commit
0 parents  commit 5db2ae2

File tree

12 files changed

+246
-0
lines changed

12 files changed

+246
-0
lines changed

.github/workflows/Action-Test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Action-Test
2+
3+
run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4+
5+
on: [pull_request]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
pull-requests: read
14+
15+
jobs:
16+
ActionTestBasic:
17+
name: Action-Test - [Basic]
18+
runs-on: ubuntu-latest
19+
steps:
20+
# Need to check out as part of the test, as its a local action
21+
- name: Checkout repo
22+
uses: actions/checkout@v4
23+
24+
- name: Action-Test
25+
uses: ./
26+
with:
27+
working-directory: ./tests
28+
subject: PSModule
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Auto-Configure
2+
3+
run-name: "Auto-Configure - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4+
5+
on:
6+
pull_request_target:
7+
branches:
8+
- main
9+
types:
10+
- closed
11+
- opened
12+
- reopened
13+
- synchronize
14+
- labeled
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
permissions:
21+
contents: write # Required to create releases
22+
pull-requests: write # Required to create comments on the PRs
23+
24+
jobs:
25+
Auto-Configure:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout Code
29+
uses: actions/checkout@v4
30+
31+
- name: Auto-Configure
32+
uses: PSModule/Auto-Configure@v1
33+
env:
34+
GITHUB_TOKEN: ${{ github.token }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Auto-Document
2+
3+
run-name: "Auto-Document - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4+
5+
on:
6+
pull_request_target:
7+
branches:
8+
- main
9+
types:
10+
- opened
11+
- reopened
12+
- synchronize
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
permissions:
19+
contents: write # Required to push to the branch
20+
21+
jobs:
22+
Auto-Document:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout Code
26+
uses: actions/checkout@v4
27+
28+
- name: Auto-Document
29+
uses: PSModule/Auto-Document@v1
30+
env:
31+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/Auto-Release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Auto-Release
2+
3+
run-name: "Auto-Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4+
5+
on:
6+
pull_request_target:
7+
branches:
8+
- main
9+
types:
10+
- closed
11+
- opened
12+
- reopened
13+
- synchronize
14+
- labeled
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
permissions:
21+
contents: write # Required to create releases
22+
pull-requests: write # Required to create comments on the PRs
23+
24+
jobs:
25+
Auto-Release:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout Code
29+
uses: actions/checkout@v4
30+
31+
- name: Auto-Release
32+
uses: PSModule/Auto-Release@v1
33+
env:
34+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/Linter.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Linter
2+
3+
run-name: "Linter - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4+
5+
on: [pull_request]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
packages: read
14+
statuses: write
15+
16+
jobs:
17+
Lint:
18+
name: Lint code base
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repo
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Lint code base
27+
uses: super-linter/super-linter/slim@latest
28+
env:
29+
GITHUB_TOKEN: ${{ github.token }}

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Ignore Visual Studio Code temporary files, build results, and
2+
## files generated by popular Visual Studio Code add-ons.
3+
##
4+
## Get latest from https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
5+
.vscode/*
6+
!.vscode/settings.json
7+
!.vscode/extensions.json
8+
*.code-workspace
9+
10+
# Local History for Visual Studio Code
11+
.history/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 PSModule
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Template-action
2+
3+
A template repository for GitHub Actions
4+
5+
## Usage
6+
7+
### Inputs
8+
9+
### Secrets
10+
11+
### Outputs
12+
13+
### Example
14+
15+
```yaml
16+
Example here
17+
```

action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: '{{ NAME }}'
2+
description: '{{ DESCRIPTION }}'
3+
author: PSModule
4+
branding:
5+
icon: upload-cloud
6+
color: white
7+
8+
inputs:
9+
working-directory:
10+
description: The working directory where Terraform will be executed
11+
required: false
12+
subject:
13+
description: The subject to greet
14+
required: false
15+
default: World
16+
17+
runs:
18+
using: composite
19+
steps:
20+
- name: '{{ NAME }}'
21+
shell: pwsh
22+
working-directory: ${{ inputs.working-directory }}
23+
env:
24+
GITHUB_ACTION_INPUT_subject: ${{ inputs.subject }}
25+
run: |
26+
# '{{ NAME }}'
27+
. "$env:GITHUB_ACTION_PATH\scripts\main.ps1" -Verbose

scripts/main.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[CmdletBinding()]
2+
param(
3+
[Parameter()]
4+
[string] $Subject = $env:GITHUB_ACTION_INPUT_subject
5+
)
6+
7+
Write-Host "Hello, $subject!"

0 commit comments

Comments
 (0)