DEV Community

loading...

How do GitHub Actions work?

Ben Halpern
A Canadian software developer who thinks he’s funny. He/Him.
・1 min read

Most straightforward explanation wins 🤪

Discussion (26)

Collapse
jwesorick profile image
Jake Wesorick

Triggered by an event related to activity on GitHub, open up a virtual machine and have it do something. Possibilities are endless but include building, testing, deploying, and posting GIFs.

Collapse
mscccc profile image
Mike Coutermarsh

I'm on the Actions team at GitHub, and this is a great description. Especially the part about GIFs.

Collapse
jsn1nj4 profile image
JSn1nj4‍‍👨‍💻

That's a good idea. Deploy a new version, generate a post on Twitter with a GIF. 🙃

Thread Thread
bnb profile image
Tierney Cyren

If you use the Twitter Together GitHub Action, you could simply PR a .tweet file and then use the automerge Action to merge it if the build passes (which it should!) :)

Collapse
waylonwalker profile image
Waylon Walker

It can even interact with non-code portions of your repo like comments and issues.

Collapse
nombrekeff profile image
Keff

And you can download artifacts generated by the action, I haven't found any use cases for myself but it's kinda cool to have!

Collapse
nelsonmestevao profile image
Nelson Estevão

Maybe compile a PDF from LaTeX and download it.

Collapse
hoangleitvn profile image
Hoang Le

It is a great and shorted description. But i think using containers will speed up provision time

Collapse
daviducolo profile image
Davide Santangelo

Are just enhanced webhooks :D. Anyway, they are a huge help to increase automation and aid continuous delivery efforts.

Collapse
jlozovei profile image
Julio Lozovei

Event-based webhooks designed to automate your project's workflows - from issues tracking to deployments. Aaaaand, it's free for open source software.

Basically, a world-class CI/CD inside your repo.

Collapse
chathula profile image
Chathula Sampath

commit -> event fired-> go through github action workflow file -> check the rules -> do the job

Github runs the job on runner you have mentioned like linux, mac or windows.

Collapse
drewmullen profile image
drewmullen

Not an explanation but here's a bunch of working examples different action workflows! github.com/drewmullen/actions-play...

Collapse
taufik_nurrohman profile image
Taufik Nurrohman • Edited

It’s just some do_action('push') stuff within the GitHub’s WordPress site environment.

We then do some add_action('push', function() {}) stuff to listen to the push event through our WordPress plugin for GitHub.

🤐

Collapse
mrmadhat profile image
Daniel Gregory

An action is triggered by an event. An event is and interaction with your repo on github. It’s like saying “Hey GitHub, when this thing happens can you do some stuff for me?” The ‘stuff’ is the set of instructions that you would like completing. An example would be to deploy when a commit is added on the master branch.

Collapse
arschles profile image
Aaron Schlesinger

GitHub has webhooks for tons of things that happen to your repo. GitHub actions lets you run whatever code you want (like unit tests!), to respond to any of those webhooks.

Your code runs on GitHub's servers and you can get status updates on whether your code passed or failed

Collapse
angt profile image
Adrien Gallouët • Edited

There's nothing straightforward than an example, the last one I wrote: github.com/angt/secret/blob/master...

Collapse
dannysteenman profile image
Danny Steenman

commit -> build -> result!

Collapse
corentinbettiol profile image
Corentin Bettiol

Start a computer in the cloud each time [an action] is executed.

Collapse
glennmen profile image
Glenn Carremans

Travis CI on steroids? 🤔

Collapse
sarthology profile image
Sarthak Sharma

I was thinking to create a series for this on Dev and you gave me another reason for it. 😅

Collapse
victoria profile image
Victoria Drake

When a GitHub event you've defined happens, someone else's computer does whatever you've told it to do.

Collapse
wassimchegham profile image
Wassim Chegham

With GitHub Actions you can react to events (anything that happens on GitHub) and run command (Actions). See it as the Event Driven pattern applied to modern DevOps.

Collapse
sharadcodes profile image
Sharad Raj (He/Him)

They work well 😂

Collapse
wuz profile image
Conlin Durbin

Run a Docker container or Node script with access to your code when something happens on Github.

Collapse
bnb profile image
Tierney Cyren

Serverless in GitHub that's free for Open Source.