microsoft/openvmm
Publicmirrored fromhttps://github.com/microsoft/openvmmAvailable
.github/workflows/refresh-mirror.yml
45lines · modecode
| 1 | name: Refresh VSO Mirror |
| 2 | on: |
| 3 | workflow_dispatch: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | - release/* |
| 8 | |
| 9 | permissions: |
| 10 | id-token: write |
| 11 | contents: read |
| 12 | |
| 13 | jobs: |
| 14 | QueueBuild: |
| 15 | runs-on: ubuntu-latest |
| 16 | steps: |
| 17 | - uses: Azure/login@v1 |
| 18 | with: |
| 19 | # These secrets describe the HvLite-GitHub service principal and associated Azure subscription, |
| 20 | # which, along with the GITHUB_TOKEN, are used to authenticate GitHub Actions to Azure with OpenID Connect. |
| 21 | # The service principal has federated identity credentials configured describing which branches and |
| 22 | # scenarios can be authenticated. |
| 23 | client-id: ${{ secrets.OPENVMM_CLIENT_ID }} |
| 24 | tenant-id: ${{ secrets.OPENVMM_TENANT_ID }} |
| 25 | subscription-id: ${{ secrets.OPENVMM_SUBSCRIPTION_ID }} |
| 26 | |
| 27 | - name: Pull Azure Key Vault secrets |
| 28 | uses: Azure/get-keyvault-secrets@v1 |
| 29 | with: |
| 30 | keyvault: 'HvLite-PATs' |
| 31 | secrets: 'HvliteMirrorPAT' |
| 32 | id: AzureKeyVault |
| 33 | |
| 34 | - name: Checkout actions |
| 35 | uses: actions/checkout@v6 |
| 36 | with: |
| 37 | fetch-depth: 0 |
| 38 | |
| 39 | - name: Install dependencies |
| 40 | shell: bash |
| 41 | run: pip install --user -r .github/scripts/refresh_mirror/requirements.txt |
| 42 | |
| 43 | - name: Refresh VSO Mirror |
| 44 | shell: bash |
| 45 | run: python .github/scripts/refresh_mirror/refresh-mirror.py 149443 ${{ steps.AzureKeyVault.outputs.HvliteMirrorPAT }} |
| 46 | |