|
37 | 37 | TEST_APP_ORG_PRIVATE_KEY:
|
38 | 38 | description: Private Key for the test GitHub App for the organization
|
39 | 39 | required: true
|
| 40 | + AZURE_CLIENT_ID: |
| 41 | + description: Azure Client ID for KeyVault authentication |
| 42 | + required: true |
| 43 | + AZURE_TENANT_ID: |
| 44 | + description: Azure Tenant ID for KeyVault authentication |
| 45 | + required: true |
| 46 | + AZURE_SUBSCRIPTION_ID: |
| 47 | + description: Azure Subscription ID for KeyVault authentication |
| 48 | + required: true |
| 49 | + KEYVAULT_KEY_REFERENCE: |
| 50 | + description: Azure KeyVault key reference URL for GitHub App authentication |
| 51 | + required: true |
40 | 52 |
|
41 | 53 | permissions:
|
42 | 54 | contents: read
|
@@ -542,6 +554,50 @@ jobs:
|
542 | 554 | Get-GitHubConfig | Format-List | Out-String
|
543 | 555 | }
|
544 | 556 |
|
| 557 | + ActionTestWithKeyVaultKeyReference: |
| 558 | + name: WithKeyVaultKeyReference |
| 559 | + runs-on: ${{ inputs.runs-on }} |
| 560 | + steps: |
| 561 | + # Need to check out as part of the test, as its a local action |
| 562 | + - name: Checkout repo |
| 563 | + uses: actions/checkout@v4 |
| 564 | + |
| 565 | + # Login to Azure to enable KeyVault access |
| 566 | + - name: Login to Azure |
| 567 | + uses: azure/login@v1 |
| 568 | + with: |
| 569 | + client-id: ${{ secrets.AZURE_CLIENT_ID }} |
| 570 | + tenant-id: ${{ secrets.AZURE_TENANT_ID }} |
| 571 | + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} |
| 572 | + allow-no-subscriptions: true |
| 573 | + |
| 574 | + - name: Action-Test |
| 575 | + uses: ./ |
| 576 | + with: |
| 577 | + ClientID: ${{ secrets.AZURE_CLIENT_ID }} |
| 578 | + KeyVaultKeyReference: ${{ secrets.KEYVAULT_KEY_REFERENCE }} |
| 579 | + Prerelease: ${{ inputs.Prerelease }} |
| 580 | + Script: | |
| 581 | + LogGroup 'Get-GitHubApp' { |
| 582 | + Get-GitHubApp | Format-List | Out-String |
| 583 | + } |
| 584 | +
|
| 585 | + LogGroup 'Get-GitHubAppInstallation' { |
| 586 | + Get-GitHubAppInstallation | Format-Table -AutoSize | Out-String |
| 587 | + } |
| 588 | +
|
| 589 | + LogGroup 'Connect to all installations of the app' { |
| 590 | + Connect-GitHubApp |
| 591 | + } |
| 592 | +
|
| 593 | + LogGroup 'Contexts' { |
| 594 | + Get-GitHubContext -ListAvailable | Format-Table -AutoSize | Out-String |
| 595 | + } |
| 596 | +
|
| 597 | + LogGroup 'GitHubConfig' { |
| 598 | + Get-GitHubConfig | Format-List | Out-String |
| 599 | + } |
| 600 | +
|
545 | 601 | ActionTestPreserveCredentialsFalse:
|
546 | 602 | name: PreserveCredentials False
|
547 | 603 | runs-on: ${{ inputs.runs-on }}
|
|
0 commit comments