Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/trigger_azdo_pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Trigger AzDO PR pipeline

on:
workflow_dispatch:
pull_request:
branches:
- main

jobs:
trigger-azdo-tests:
runs-on: ubuntu-latest
environment: ni-dev
steps:
- name: Set variables for pull_request
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "BUILD_REF=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
echo "REPO_URL=${{ github.server_url }}/${{ github.event.pull_request.head.repo.full_name }}.git" >> $GITHUB_ENV
- name: Set variables for manual run
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "BUILD_REF=${{ github.ref_name }}" >> $GITHUB_ENV
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor style nitpick: there's an extra space in ${{ github here

echo "REPO_URL=${{ github.server_url }}/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Trigger Main
uses: Azure/pipelines@v1.2
with:
azure-devops-project-url: "https://dev.azure.com/ni/DevCentral"
azure-pipeline-name: "ni-central-rtos-nile-github"
azure-devops-token: ${{ secrets.AZDO_PIPELINE_TRIGGERS }}
azure-pipeline-variables: >
{"BUILD_REF":"${{ env.BUILD_REF }}","REPO_URL":"${{ env.REPO_URL }}"}