简体   繁体   中英

How to use Github Actions with Azure Devops Pipelines

I am trying to run an azure devops pipeline kicked off by github actions.

The started example from Azure Pipelines is this:

- uses: Azure/pipelines@v1
  with:
    azure-devops-project-url: 'https://dev.azure.com/organization/project-name'
    azure-pipeline-name: 'pipeline-name' # name of the Azure pipeline to be triggered
    azure-devops-token: '${{ secrets.AZURE_DEVOPS_TOKEN }}' 

I am structuring mine akin to this:

name: workflow 
on: push

jobs:
 deploy-using-azure-pipelines:
    runs-on: ubuntu-latest
    steps:
    - name: 'Trigger an Azure Pipeline to deploy the app to PRODUCTION'
      uses: Azure/pipelines@v1
      with:
        azure-devops-project-url: 'https://dev.azure.com/AccountName/ProjectName'
        azure-pipeline-name: 'WebApp_Azure_Prod' 
        azure-devops-token: '${{ secrets.AZURE_DEVOPS_TOKEN }}'

I have the proper secrets defined, and this is in my git as push.yml under the workflows folder, and I have set the proper pipeline name and project url. How can I improve this so that it is functional?

  1. Try and validate your code using yaml validator .
  2. Make sure you've added your azure-devops-token onto your GitHub project settings for Secrets page.
  3. Try and lower case the Azure/pipelines@v1 to azure/pipelines@v1 .

Otherwise, your code looks very similar to the same code I run and it's working for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM