Skip to content

Commit

Permalink
Federated id does not work for marketplace yet
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Mar 5, 2024
1 parent 2071233 commit 6575819
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 30 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ jobs:
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }}
63 changes: 33 additions & 30 deletions .github/workflows/ci_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ on:
AZURE_TENANT_ID:
description: "Azure Tenant ID"
required: true
AZDO_TOKEN:
description: "AZDO Token"
required: true

permissions:
id-token: write
Expand Down Expand Up @@ -287,19 +290,19 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Azure Login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
allow-no-subscriptions: true
- name: Get Token
id: get_token
run: |
echo "azdo_token=$(az account get-access-token --resource=https://monacotools.visualstudio.com --query accessToken -o tsv)" >> $GITHUB_OUTPUT
- name: Check Token
run: |
echo "Token length: $(echo "${{ steps.get_token.outputs.azdo_token }}" | wc -c)"
# - name: Azure Login
# uses: azure/login@v2
# with:
# client-id: ${{ secrets.AZURE_CLIENT_ID }}
# tenant-id: ${{ secrets.AZURE_TENANT_ID }}
# allow-no-subscriptions: true
# - name: Get Token
# id: get_token
# run: |
# echo "azdo_token=$(az account get-access-token --resource=https://monacotools.visualstudio.com --query accessToken -o tsv)" >> $GITHUB_OUTPUT
# - name: Check Token
# run: |
# echo "Token length: $(echo "${{ steps.get_token.outputs.azdo_token }}" | wc -c)"

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
Expand All @@ -317,8 +320,8 @@ jobs:
AZDO_PROJECT: ${{ inputs.AZDO_PROJECT }}
AZDO_BUILD: ${{ inputs.AZDO_BUILD }}
AZDO_ORG: ${{ inputs.AZDO_ORG }}
AZDO_TOKEN: ${{ steps.get_token.outputs.azdo_token }}
AZURE_DEVOPS_EXT_PAT: ${{ steps.get_token.outputs.azdo_token }}
AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }}
AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZDO_TOKEN }}
BUILD_NUMBER: ${{ github.run_id }}
IS_PR: ${{ github.head_ref }}
BRANCH: ${{ github.ref }}
Expand Down Expand Up @@ -400,19 +403,19 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Azure Login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
allow-no-subscriptions: true
- name: Get Token
id: get_token
run: |
echo "azdo_token=$(az account get-access-token --resource=https://monacotools.visualstudio.com --query accessToken -o tsv)" >> $GITHUB_OUTPUT
- name: Check Token
run: |
echo "Token length: $(echo "${{ steps.get_token.outputs.azdo_token }}" | wc -c)"
# - name: Azure Login
# uses: azure/login@v2
# with:
# client-id: ${{ secrets.AZURE_CLIENT_ID }}
# tenant-id: ${{ secrets.AZURE_TENANT_ID }}
# allow-no-subscriptions: true
# - name: Get Token
# id: get_token
# run: |
# echo "azdo_token=$(az account get-access-token --resource=https://monacotools.visualstudio.com --query accessToken -o tsv)" >> $GITHUB_OUTPUT
# - name: Check Token
# run: |
# echo "Token length: $(echo "${{ steps.get_token.outputs.azdo_token }}" | wc -c)"

# Published action contains compiled JS, but we need to compile it here
- uses: actions/setup-node@v3
Expand All @@ -430,8 +433,8 @@ jobs:
AZDO_PROJECT: ${{ inputs.AZDO_PROJECT }}
AZDO_BUILD: ${{ inputs.AZDO_BUILD }}
AZDO_ORG: ${{ inputs.AZDO_ORG }}
AZDO_TOKEN: ${{ steps.get_token.outputs.azdo_token }}
AZURE_DEVOPS_EXT_PAT: ${{ steps.get_token.outputs.azdo_token }}
AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }}
AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZDO_TOKEN }}
BUILD_NUMBER: ${{ github.run_id }}
IS_PR: ${{ github.head_ref }}
BRANCH: ${{ github.ref }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ jobs:
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/pr-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ jobs:
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/pr_auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ jobs:
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZDO_TOKEN: ${{ secrets.AZDO_TOKEN }}

0 comments on commit 6575819

Please sign in to comment.