Skip to content

ci: add test.yml for quicker azure auth tests #1

ci: add test.yml for quicker azure auth tests

ci: add test.yml for quicker azure auth tests #1

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- 'main'
tags:
- 'v*.*.*'
paths-ignore:
- 'docs/**'
- '*.md'
- 'mkdocs*.yml'
pull_request:
branches:
- 'main'
paths-ignore:
- 'docs/**'
- '*.md'
- 'mkdocs*.yml'
permissions:
id-token: write
contents: read
jobs:
build:
name: Build
runs-on: windows-latest
steps:
- name: Azure login
if: github.ref == 'refs/heads/main'
uses: Azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: Create File
shell: powershell
run: (Get-Date).ToString('o') | Set-Content test.txt
- name: Upload to Azure
env:
AZURE_STORAGE_NAME: ${{ secrets.AZURE_STORAGE_NAME }}
AZURE_BLOB_NAME: ${{ secrets.AZURE_BLOB_NAME }}
shell: powershell
run: |
az storage blob upload -f test.txt -c $env:AZURE_STORAGE_NAME -n $env:AZURE_BLOB_NAME --auth-mode login