[IDP-3236] Use IDP managed secrets solution for CI and publish workflows #247
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| on: | |
| pull_request: | |
| branches: ["main", "master"] | |
| paths-ignore: ["*.md"] | |
| push: | |
| branches: | |
| - "renovate/**" | |
| # Prevent duplicate runs if Renovate falls back to creating a PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{github.event_name}}-${{ github.head_ref || github.ref_name }} | |
| cancel-in-progress: true | |
| # We are using OpenID Connect to authenticate with Azure with secret. | |
| # https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-azure | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| ci: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 'Azuze CLI login' | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ vars.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ vars.AZURE_TENANT_ID }} | |
| subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} | |
| - name: Get Secrets from Azure Key Vault | |
| id: get_secrets | |
| run: | | |
| # Set env.ADO_PAT | |
| ADO_PAT=$(az keyvault secret show --vault-name ${{ vars.IDP_CICD_KEYVAULT_NAME }} --name "gsoft-nuget-feed-ado-pat" --query value -o tsv) | |
| echo "::add-mask::$ADO_PAT" | |
| echo "ado_pat=$ADO_PAT" >> $GITHUB_OUTPUT | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| source-url: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }} | |
| env: | |
| NUGET_AUTH_TOKEN: ${{ steps.get_secrets.outputs.ado_pat }} | |
| - run: ./Build.ps1 | |
| shell: pwsh | |
| env: | |
| NUGET_SOURCE: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }} | |
| NUGET_API_KEY: ${{ steps.get_secrets.outputs.ado_pat }} | |
| linearb: | |
| needs: [ci] | |
| uses: workleap/wl-reusable-workflows/.github/workflows/linearb-deployment.yml@main | |
| with: | |
| environment: development | |
| secrets: inherit |