diff --git a/.github/workflows/code-mirror.yml b/.github/workflows/code-mirror.yml new file mode 100644 index 00000000000..fe2ce3e045a --- /dev/null +++ b/.github/workflows/code-mirror.yml @@ -0,0 +1,29 @@ +name: Code Mirror + +on: [push] + +permissions: + id-token: write # Permission to fetch OIDC token + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # Checkout the repo + - uses: actions/checkout@main + - uses: azure/login@v1 + with: + client-id: ${{ secrets.CODE_MIRROR_CLIENT_ID }} + tenant-id: ${{ secrets.CODE_MIRROR_TENANT_ID }} + subscription-id: ${{ secrets.CODE_MIRROR_SUBSCRIPTION_ID }} + + # Queue a code mirror build in azure devops + - name: Queue a build + run: | + az pipelines build queue --definition-id 16 --project internal --org dnceng --variables BranchToMirror=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} GitHubRepo=${{ github.repository_owner }}/${{ github.repository }} + + - name: logout + run: | + az logout \ No newline at end of file