idk lets try this
This commit is contained in:
parent
cf64b3d548
commit
c7a7fe517b
14 changed files with 373 additions and 0 deletions
8
.github/actions/expand-tokens/Dockerfile
vendored
Normal file
8
.github/actions/expand-tokens/Dockerfile
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
FROM mcr.microsoft.com/powershell
|
||||
WORKDIR /action
|
||||
|
||||
RUN pwsh -c '$ProgressPreference = "SilentlyContinue"; Install-Module Axinom.DevOpsTooling -Scope AllUsers -AllowPrerelease -Force'
|
||||
|
||||
COPY *.ps1 .
|
||||
|
||||
ENTRYPOINT ["pwsh", "-c", "& /action/entrypoint.ps1"]
|
14
.github/actions/expand-tokens/action.yml
vendored
Normal file
14
.github/actions/expand-tokens/action.yml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
name: 'Expand tokens'
|
||||
description: 'Replaces `__TOKENS__` with the values of equivalent environment variables in files.'
|
||||
inputs:
|
||||
path:
|
||||
description: 'Path to the file or directory to process.'
|
||||
required: true
|
||||
filenames:
|
||||
description: 'Filename filter, used if path is a directory.'
|
||||
recursive:
|
||||
description: 'Whether to recursively search for files, used if path is a directory.'
|
||||
default: false
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
7
.github/actions/expand-tokens/entrypoint.ps1
vendored
Normal file
7
.github/actions/expand-tokens/entrypoint.ps1
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Import-Module Axinom.DevOpsTooling
|
||||
|
||||
$path = Join-Path $env:GITHUB_WORKSPACE $env:INPUT_PATH
|
||||
|
||||
Expand-Tokens -path $path -filenames $env:INPUT_FILENAMES -recursive:([bool]$env:INPUT_RECURSIVE)
|
Loading…
Add table
Add a link
Reference in a new issue