-
Notifications
You must be signed in to change notification settings - Fork 234
actions
GitHub Actions are defined in each repository's .github/workflows
with either .yml
or .yaml
file extensions. You can find a list of all of these files in the fastai organization with this search query
While it is not feasible to walk through every single GitHub Action, here are some notes on some common uses of Actions and associated syntax you may encounter in many of the workflow files in the linked search query listed above. All of the below examples are taken from real workflows in fastai.
Actions workflows are triggered by various GitHub events at the top of workflow files (.github/workflows/*.yaml
). In the below example, any push to the master branch OR a pull request will trigger the workflow to be run. The pull_request_target
event is a special flavor of a pull_request
event that allows the workflow to have permissions to take actions like make a comment on a pull request. Finally, the workflow_dispatch
event allows you to manually trigger workflows.
name: CI
on:
workflow_dispatch: #allows repo admins to trigger this workflow from the Actions tab
push:
branches:
- master
pull_request_target:
You can also schedule workflows to execute on a periodic basis with cron
.
name: Build fastai2 images
on:
schedule:
- cron: '1 6 * * *'
workflow_dispatch: #allows you to trigger manually
push:
branch:
- master
paths:
- 'fastai2-build/**'
🚧 Work in progress 🚧