# GitHub Actions
Yao-Yuan Mao (Rutgers, @yymao)
Link to this slide deck: https://bit.ly/gha1201
![](https://i.imgur.com/sfMFgXv.png)
---
## Getting to know you!
![Yes](https://i.imgur.com/DyGdqF0.png) if you have used GitHub Actions.
![No](https://i.imgur.com/cKpjj4D.png) if you have ++not++ used GitHub Actions ++nor++ any other CI/CD tools.
![Go faster](https://i.imgur.com/sGLxL2h.png) if you have used other CI/CD tools, but ++not++ GitHub Actions.
---
## What is GitHub Actions?
A set of ++predefined, customizable tasks++ that run on the GitHub cloud when specific ++triggering events++ take place, with results shown and integrated in GitHub.
---
## Billing
(aka why we are moving to GitHub Actions)
![](https://i.imgur.com/mHirdzL.png)
[See details here.](https://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions)
---
## Actions in Action!
Let's create a simple ++workflow++.
---
## Examples in DESC
[Generate publication list on DESC website](https://github.com/LSSTDESC/lsstdesc.github.io/blob/master/.github/workflows/update-publication.yml)
([Example run](https://github.com/LSSTDESC/lsstdesc.github.io/runs/1468548531); [deployed product](https://lsstdesc.org/pages/publications.html))
[Build the desc-python-bleed kernel](https://github.com/LSSTDESC/desc-python/blob/master/.github/workflows/desc-python-bleed.yml)
([Example run](https://github.com/LSSTDESC/desc-python/runs/1470872428))
[Run linters and tests for GCRCatalogs](https://github.com/LSSTDESC/gcr-catalogs/blob/master/.github/workflows/pythonpackage.yml)
([Example run](https://github.com/LSSTDESC/gcr-catalogs/runs/1470275865))
---
## Most useful links (IMHO)
- [The basics](https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions) (useful for reviewing what we talked about today)
- [Advanced techniques](https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows): [secrets](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets), [cache](https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows)
- Examples: [Testing Python packages](https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python), [migrate from travis CI](https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/migrating-from-travis-ci-to-github-actions)
- Reference: [Syntax](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions), [triggering events](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows), [expression](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions)
- [Action Marketplace](https://github.com/marketplace?type=actions) (Community actions usually host detailed documentation in their own GitHub repos)
{"metaMigratedAt":"2023-06-15T16:23:07.232Z","metaMigratedFrom":"YAML","title":"GitHub Actions","breaks":true,"slideOptions":"{\"theme\":\"white\"}","contributors":"[{\"id\":\"4a904b2f-23a3-4034-a820-34e41cd0ef1a\",\"add\":5807,\"del\":2694}]"}