Live data from Hacker News

Doing stupid stuff with GitHub Actions

devopsdirective.com

41–46 of 46 posts

Re: Doing stupid stuff with GitHub Actions

#41
post #38

Unlike the authoer, I haven't found Github Actions very intuitive to work with :) I've asked this before on a similar post, maybe someone here knows. Has anyone managed to get a Pre-Release to track Master using Github Actions? I can't seem to find a working example that does this (and I can't seem to cobble one together myself) There are a few things that are seemingly intentionally left out of GitHub Actions... lik…

I think you could build on this action https://github.com/actions/github-script/ which provides a JS client for the GitHub API.

It looks like it supports all of the API routes you would need including:

https://github.com/actions/github-script/blob/b507739f17c210...

To actually perform the release update.

Re: Doing stupid stuff with GitHub Actions

#42
post #7

I really enjoyed Jonty Wareing's hack recently where he built a static site generator inside a GitHub Action that works by doing the following: 1. Spin up a Python Flask web server on localhost 2. Run "wget --mirror" against it to crawl the site and save it as static files 3. Publish the resulting static files to GitHub Pages The workflow is here. It's genius: https://github.com/pubstandards/pubstandards-london/blob/…

Instead of wget-ing localhost, maybe it's better to use Frozen-Flask[1] instead. I use it to implement my own static site generator for my personal website and it's working great. [1] https://pythonhosted.org/Frozen-Flask/

That sounds too straightforward, therefore not worth as many internet points...

(Thanks that's a nice share!)

Re: Doing stupid stuff with GitHub Actions

#43

Reminds me of my first year in college, when we'd log into each other's machines at the computer lab for some intro to computing class, and launch a fork-bomb script that simply launched itself twice, quickly rendering the machine useless. The tricky part was to test it without halting your own machine, as a newbie programmer and Unix user.

Haha - We have it too easy these days and can just spin up a VM with Virtual Box (or similar) to test stuff like this.

Re: Doing stupid stuff with GitHub Actions

#44
post #40
post #36

Earlier quoted context omitted.

Just curious - why didn't you decide to serve the site from object storage?

Mostly because I knew I wanted to play around with trying out different configurations, testing performance, etc... If I didn't have those secondary goals, I would have either: 1) Hosted on Netlify OR 2) Hosted in an S3 / GCS bucket

cool - and the micro instance is free anyway

Re: Doing stupid stuff with GitHub Actions

#45
post #7

I really enjoyed Jonty Wareing's hack recently where he built a static site generator inside a GitHub Action that works by doing the following: 1. Spin up a Python Flask web server on localhost 2. Run "wget --mirror" against it to crawl the site and save it as static files 3. Publish the resulting static files to GitHub Pages The workflow is here. It's genius: https://github.com/pubstandards/pubstandards-london/blob/…

I was trying to look into GitHub actions but didn't really understand it. I just straight up called CLI commands eg. $git commit -m "..." and ran those after I put a key(in my case on a pi) and it does commits by CRON. I was just publishing sensor data to my GitHub readme. But it's cool that it works.

Re: Doing stupid stuff with GitHub Actions

#46
post #41
post #38

Unlike the authoer, I haven't found Github Actions very intuitive to work with :) I've asked this before on a similar post, maybe someone here knows. Has anyone managed to get a Pre-Release to track Master using Github Actions? I can't seem to find a working example that does this (and I can't seem to cobble one together myself) There are a few things that are seemingly intentionally left out of GitHub Actions... lik…

I think you could build on this action https://github.com/actions/github-script/ which provides a JS client for the GitHub API. It looks like it supports all of the API routes you would need including: https://github.com/actions/github-script/blob/b507739f17c210... To actually perform the release update.

it's strange to me this isn't a first class feature

Thanks for the tip. I don't really know JS so I may dig into this if it becomes a major burden. For the time being I'll just manually delete the prerelease between pushes

Post reply on HN