Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

A feature to trigger Eaas workflow from Github Action.

GitHub Actions Overview

GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want.

To create cluster using codespace, follow the below steps :

  • Create a folder named .github/workflows at the root of the repository.

  • Create a new file with name roost.yaml , and copy the below code snippet in it.

name: Roost workflow template

on:
  pull_request:
    types: [opened, reopened]
    
jobs:
    Initiate-Roost-Workflow:
        name: 'Initiate Roost Workflow'
        runs-on: ubuntu-latest
        steps:
            - name: 'Call Roost WebHook'
              uses: indiesdev/curl@v1.1
              id: roost
              with:
                url: https://${{ secrets.ROOST_SERVER }}/api/application/triggerEaasFromGhActions
                method: 'POST'
                accept: 200,201,204
                headers: '{ "Content-Type": "application/json" }'
                body: |
                  "repo_id": "${{ github.event.repository.id }}"
                  "app_user_id": "${{ secrets.ROOST_SECRET }}"
                  "full_repo_name": "${{ github.repository }}"
                  "branch": "${{ github.base_ref }}"
                  "workflow_run_id": "${{ github.run_id }}"
                  "user_name": "${{ github.actor }}"
                  "title": "${{ github.workflow }}"
                  "application_name": "descope"
            - run: 
                echo ${{ steps.roost.outputs.response }}
  • To use secrets in the above code, go to Github repository → Settings → Secrets → Actions.

  • Create secrets with names.

  • To trigger Eaas go to GitHub Actions, and trigger the workflow.

  • No labels