Providers #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Update providers data | |
# | |
# NOTES: | |
# Automatically updates provider data stored in data/ with the latest versions. | |
name: Providers | |
on: | |
schedule: | |
- cron: '0 0 1 * *' # 00:00 on first day of each month | |
workflow_dispatch: | |
permissions: {} | |
env: | |
WORKING_BRANCH: dependencies/providers-bump | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
jobs: | |
bump: | |
name: Bump providers | |
runs-on: ubuntu-latest | |
if: github.repository == 'Azure/PSRule.Rules.Azure' | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure | |
run: | | |
git config user.name github-actions | |
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
- name: Get working branch | |
run: | | |
git checkout -B ${{ env.WORKING_BRANCH }} --force | |
- name: Azure Login | |
uses: Azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
enable-AzPSSession: true | |
- name: Bump Providers | |
uses: Azure/powershell@v2 | |
with: | |
inlineScript: | | |
Import-Module ./scripts/providers.psm1; | |
Update-Providers -Path ./data; | |
azPSVersion: latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |