Replace actions with externally hosted
This commit is contained in:
parent
a6785a38e5
commit
e432961cdf
8 changed files with 4 additions and 64 deletions
8
.github/actions/expand-tokens/Dockerfile
vendored
8
.github/actions/expand-tokens/Dockerfile
vendored
|
@ -1,8 +0,0 @@
|
|||
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
14
.github/actions/expand-tokens/action.yml
vendored
|
@ -1,14 +0,0 @@
|
|||
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
7
.github/actions/expand-tokens/entrypoint.ps1
vendored
|
@ -1,7 +0,0 @@
|
|||
$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)
|
|
@ -1,8 +0,0 @@
|
|||
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"]
|
15
.github/actions/make-version-string/action.yml
vendored
15
.github/actions/make-version-string/action.yml
vendored
|
@ -1,15 +0,0 @@
|
|||
name: 'Create the version string'
|
||||
description: 'Generates a version string of the form [branch-]1.2.3-NNNNNNNNNNN-CCCCCCC, where N is an incrementing value and C identifies the commit, with an optional branch prefix. Fields lengths are unspecified and may increase in future versions.'
|
||||
inputs:
|
||||
assemblyInfoPath:
|
||||
description: 'Path to a .NET style AssemblyInfo file containing the numeric version component.'
|
||||
required: true
|
||||
primaryBranch:
|
||||
description: 'Name of the primary branch, the one that is published without any version string prefix.'
|
||||
default: 'master'
|
||||
outputs:
|
||||
versionstring:
|
||||
description: 'The generated version string'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
|
@ -1,8 +0,0 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Import-Module Axinom.DevOpsTooling
|
||||
|
||||
$path = Join-Path $env:GITHUB_WORKSPACE $env:INPUT_ASSEMBLYINFOPATH
|
||||
|
||||
$version = Set-DotNetBuildAndVersionStrings -assemblyInfoPath $path -commitId $ENV:GITHUB_SHA -primaryBranchName $env:INPUT_PRIMARYBRANCH
|
||||
Write-Host "::set-output name=versionstring::$version"
|
4
.github/workflows/push-to-latest.yml
vendored
4
.github/workflows/push-to-latest.yml
vendored
|
@ -7,11 +7,11 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- id: make_version_string
|
||||
uses: ./.github/actions/make-version-string
|
||||
uses: sandersaares-actions/make-version-string@master
|
||||
with:
|
||||
assemblyInfoPath: AssemblyInfo.cs
|
||||
primaryBranch: 'latest'
|
||||
- uses: ./.github/actions/expand-tokens
|
||||
- uses: sandersaares-actions/expand-tokens@master
|
||||
env:
|
||||
VERSIONSTRING: ${{ steps.make_version_string.outputs.versionstring }}
|
||||
with:
|
||||
|
|
4
.github/workflows/push-to-master.yml
vendored
4
.github/workflows/push-to-master.yml
vendored
|
@ -7,11 +7,11 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- id: make_version_string
|
||||
uses: ./.github/actions/make-version-string
|
||||
uses: sandersaares-actions/make-version-string@master
|
||||
with:
|
||||
assemblyInfoPath: AssemblyInfo.cs
|
||||
primaryBranch: 'latest'
|
||||
- uses: ./.github/actions/expand-tokens
|
||||
- uses: sandersaares-actions/expand-tokens@master
|
||||
env:
|
||||
VERSIONSTRING: ${{ steps.make_version_string.outputs.versionstring }}
|
||||
with:
|
||||
|
|
Loading…
Add table
Reference in a new issue