![]() Here, we are using the github context, the contains() function, != and & operators, and steps context to check the condition.īeside of the if: success() in steps, you can add jobs dependency on each other by using the needs: name: actions-test If: success() & github.event_name = 'push' Run: echo "Running because of previous Step was successful and the trigger event was 'push'" In your workflow, you also can add some inputs that will be available as variables in steps via the github.event context: name: actions-test Or use a cronjob, see the Scheduled events: name: actions-testĪlso, you can configure an ability to execute a workflow manually by using the workflow_dispatch in the on: name: actions-testĪnd after this, in the Actions you’ll get a button to run that flow: Such a condition can be a pull request or commit to a repository, a schedule, or some event outside of Github that will run a webhook to your repository.Īlso, you can configure those conditions for different branches of the repository: name: actions-test In Events, you can describe conditions to run that flow. Go to the Github WebUI, switch to the Actions tab, you’ll see this workflow execution: Git add .github/workflows/actions-test.yaml & git commit -m "Test flow" & git push github/workflows/ – here we will store all workflows, that can be trigger with different events: In your repository root create a directory called. Let’s start with a simple file to see how it works. steps: tasks in this job to be executed with uses or run.runs-on: a runner, which will execute job(s). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |