Skip to content

Commit

Permalink
cdn github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidVollmers committed Apr 19, 2024
1 parent 84583a0 commit a83c019
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/cdn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CDN

on:
push:
tags: [ '**' ]

jobs:
Upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# https://github.com/actions/checkout/issues/701 https://github.com/actions/checkout/pull/579
fetch-depth: 0
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- run: echo "VERSION=$(git describe --tags)" >> $GITHUB_ENV
- uses: azure/CLI@v1
with:
inlineScript: |
az storage blob upload --auth-mode key --account-name dvolper -f ./src/Doki.CommandLine/doki.config.schema.json -c cdn -n 'doki/$VERSION/doki.config.schema.json'
- uses: azure/CLI@v1
with:
inlineScript: |
az cdn endpoint purge --content-paths "/doki/*" --profile-name "dvolper-cdnp" --name "dvolper" --resource-group "dvolper-rg"
- run: |
az logout
if: always()
2 changes: 1 addition & 1 deletion src/Doki.CommandLine/Commands/InitCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private async Task<int> HandleCommandAsync(InvocationContext context)

var cancellationToken = context.GetCancellationToken();

var version = GetType().Assembly.GetName().Version?.ToString(3) ?? "latest";
var version = GetType().Assembly.GetName().Version?.ToString(3);

var dokiConfig = new DokiConfig
{
Expand Down

0 comments on commit a83c019

Please sign in to comment.