Update TriggerExtensionRelease.yml #8
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
name: CI | |
# Run this workflow every time a commit gets pushed to main | |
# This triggers the ADO OneBranch CI Pipeline | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
# This is the only solution to trigger OneBranch pipeline from a GitHub commit。 | |
# But it lacks batch CI support, we have to use concurrency to prevent earlier commits task overwriting index.json from later ones。 | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency | |
concurrency: | |
group: trigger-extension-release | |
jobs: | |
build: | |
name: Trigger OneBranch ADO Pipeline (CI) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | |
with: | |
egress-policy: audit | |
- name: Azure Pipelines Action | |
uses: Azure/pipelines@v1.2 | |
with: | |
azure-devops-project-url: https://dev.azure.com/azclitools/internal | |
azure-pipeline-name: 'testOneBranchCLI-Official' | |
# https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows | |
# expire on 2024/9/21 | |
azure-devops-token: ${{ secrets.ONE_BRANCH_TOKEN }} | |
# azure-pipeline-variables: '{"commit_id": "${{ github.sha }}"}' | |
azure-pipeline-variables: '{"commit_id": "cd149b7c50dbac2e3124ef1743a3270a727998ca"}' | |
- name: Wait for Extension Release | |
run: sleep 600 |