Replace actions with externally hosted

This commit is contained in:
Sander Saares 2020-01-28 15:28:27 +02:00
parent a6785a38e5
commit e432961cdf
8 changed files with 4 additions and 64 deletions

View file

@ -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"]

View file

@ -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'

View file

@ -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)

View file

@ -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"]

View file

@ -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'

View file

@ -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"

View file

@ -7,11 +7,11 @@ jobs:
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- id: make_version_string - id: make_version_string
uses: ./.github/actions/make-version-string uses: sandersaares-actions/make-version-string@master
with: with:
assemblyInfoPath: AssemblyInfo.cs assemblyInfoPath: AssemblyInfo.cs
primaryBranch: 'latest' primaryBranch: 'latest'
- uses: ./.github/actions/expand-tokens - uses: sandersaares-actions/expand-tokens@master
env: env:
VERSIONSTRING: ${{ steps.make_version_string.outputs.versionstring }} VERSIONSTRING: ${{ steps.make_version_string.outputs.versionstring }}
with: with:

View file

@ -7,11 +7,11 @@ jobs:
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- id: make_version_string - id: make_version_string
uses: ./.github/actions/make-version-string uses: sandersaares-actions/make-version-string@master
with: with:
assemblyInfoPath: AssemblyInfo.cs assemblyInfoPath: AssemblyInfo.cs
primaryBranch: 'latest' primaryBranch: 'latest'
- uses: ./.github/actions/expand-tokens - uses: sandersaares-actions/expand-tokens@master
env: env:
VERSIONSTRING: ${{ steps.make_version_string.outputs.versionstring }} VERSIONSTRING: ${{ steps.make_version_string.outputs.versionstring }}
with: with: