From e432961cdf7bf9a25bc34b45de29a0e72aa2b763 Mon Sep 17 00:00:00 2001 From: Sander Saares Date: Tue, 28 Jan 2020 15:28:27 +0200 Subject: [PATCH] Replace actions with externally hosted --- .github/actions/expand-tokens/Dockerfile | 8 -------- .github/actions/expand-tokens/action.yml | 14 -------------- .github/actions/expand-tokens/entrypoint.ps1 | 7 ------- .github/actions/make-version-string/Dockerfile | 8 -------- .github/actions/make-version-string/action.yml | 15 --------------- .../actions/make-version-string/entrypoint.ps1 | 8 -------- .github/workflows/push-to-latest.yml | 4 ++-- .github/workflows/push-to-master.yml | 4 ++-- 8 files changed, 4 insertions(+), 64 deletions(-) delete mode 100644 .github/actions/expand-tokens/Dockerfile delete mode 100644 .github/actions/expand-tokens/action.yml delete mode 100644 .github/actions/expand-tokens/entrypoint.ps1 delete mode 100644 .github/actions/make-version-string/Dockerfile delete mode 100644 .github/actions/make-version-string/action.yml delete mode 100644 .github/actions/make-version-string/entrypoint.ps1 diff --git a/.github/actions/expand-tokens/Dockerfile b/.github/actions/expand-tokens/Dockerfile deleted file mode 100644 index 72a476f..0000000 --- a/.github/actions/expand-tokens/Dockerfile +++ /dev/null @@ -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"] \ No newline at end of file diff --git a/.github/actions/expand-tokens/action.yml b/.github/actions/expand-tokens/action.yml deleted file mode 100644 index fba91f3..0000000 --- a/.github/actions/expand-tokens/action.yml +++ /dev/null @@ -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' \ No newline at end of file diff --git a/.github/actions/expand-tokens/entrypoint.ps1 b/.github/actions/expand-tokens/entrypoint.ps1 deleted file mode 100644 index 5a7800c..0000000 --- a/.github/actions/expand-tokens/entrypoint.ps1 +++ /dev/null @@ -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) \ No newline at end of file diff --git a/.github/actions/make-version-string/Dockerfile b/.github/actions/make-version-string/Dockerfile deleted file mode 100644 index 72a476f..0000000 --- a/.github/actions/make-version-string/Dockerfile +++ /dev/null @@ -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"] \ No newline at end of file diff --git a/.github/actions/make-version-string/action.yml b/.github/actions/make-version-string/action.yml deleted file mode 100644 index 361f714..0000000 --- a/.github/actions/make-version-string/action.yml +++ /dev/null @@ -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' \ No newline at end of file diff --git a/.github/actions/make-version-string/entrypoint.ps1 b/.github/actions/make-version-string/entrypoint.ps1 deleted file mode 100644 index e5a9ac7..0000000 --- a/.github/actions/make-version-string/entrypoint.ps1 +++ /dev/null @@ -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" \ No newline at end of file diff --git a/.github/workflows/push-to-latest.yml b/.github/workflows/push-to-latest.yml index eb424ee..baae492 100644 --- a/.github/workflows/push-to-latest.yml +++ b/.github/workflows/push-to-latest.yml @@ -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: diff --git a/.github/workflows/push-to-master.yml b/.github/workflows/push-to-master.yml index c7a2c95..e6ed569 100644 --- a/.github/workflows/push-to-master.yml +++ b/.github/workflows/push-to-master.yml @@ -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: