Live data from Hacker News

GitHub Actions Pitfalls

fusectore.dev

41–50 of 111 posts

Re: GitHub Actions Pitfalls

#41

The most annoying thing for me is that a workflow_dispatch only workflow can't be launch manually until it's push into default branch as they are not listed. I can understand the Web-UI won't list them but even GitHub cli can't launch them. Once they appear in the default branch, only then you are free to launch them on any branch.

I use gh workflow cli. it works without pushing workflow to default branch. https://cli.github.com/manual/gh_workflow_run

Re: GitHub Actions Pitfalls

#42
post #28

Earlier quoted context omitted.

I've been waiting since 2013 for crypto to have a facebook-level contribution but it's still just the same crap. Every 2-3 years, the world remembers crypto exists and they funnel money into it only to be fleeced. I've yet to see one piece of tech from the crypto craze that has substantially altered peoples' lives besides losing most people money. If you're looking to get on the jump for a new piece of tech, it's pro…

Facebook substantially altered lives: it is used for genocide, recruiting insurrections, and ruins mental health -- and nobody here is wringing their hands about working on the broader ecosystem. Engineers who worked to build out DTC brands aren't considered lepers. It feels like a double standard and pulling the ladder up, so even if the next generation of startup programmers get work, they'll be "tainted" by starti…

I was careful when I didn't write any positive things about facebook, but it is used by the entire world which was my point.

Also, I'm nowhere near SF or in the SV sphere. I'm a plain, old .NET and Typescript developer. lol

I didn't say crypto was doing good or ill. I'm just saying it's done nothing that a critical mass of users has used besides speculation.

Re: GitHub Actions Pitfalls

#43

I now use a Makefile and put as much logic as I can in `make cicd` so I can call it in a single line, keeping the GitHub action as simple as possible.

Absolutely. The problem is when you have a lot of time-consuming steps and you only want to re-run the failed one with a slight change and then continue where it left off. Make can do that of course, but you need to make Make do it, and save/restore a workspace/artifacts. I haven't done that in GHA and GHA has lacked a lot of core ci/cd functionality for a long time, so I don't know if it's possible in GHA.

Re: GitHub Actions Pitfalls

#44
post #3

If you want to run github actions locally before any pitfalls, you can try out https://github.com/nektos/act

And for gitlab pipelines: https://stackoverflow.com/q/32933174

Unfortunately, it only supports running single jobs. More complex tasks that requires dependencies, variables, job creation context (MR, Trigger, Web, etc.) can't be tested.

Re: GitHub Actions Pitfalls

#45
post #9

Also a fun one is the "on" key that specifies when the workflow should run. "on" is magic in yaml, and some implementations will convert it to the string (!) "True" when it occurs as a key (I'm not talking about values here). This was a bit confusing when I tried to replace a hand-written yaml with a generated json ... They were identical, except for the on/True key. It's still not clear to me whether this is accordi…

> I wonder, does GitHub Actions internally look for both "on" and "True"?

More likely they hacked their YAML parser to treat on as a string.

At least that's what Travis CI folks did:

https://github.com/travis-ci/travis-yml#user-content-yaml

Re: GitHub Actions Pitfalls

#46
post #28

Earlier quoted context omitted.

I've been waiting since 2013 for crypto to have a facebook-level contribution but it's still just the same crap. Every 2-3 years, the world remembers crypto exists and they funnel money into it only to be fleeced. I've yet to see one piece of tech from the crypto craze that has substantially altered peoples' lives besides losing most people money. If you're looking to get on the jump for a new piece of tech, it's pro…

Facebook substantially altered lives: it is used for genocide, recruiting insurrections, and ruins mental health -- and nobody here is wringing their hands about working on the broader ecosystem. Engineers who worked to build out DTC brands aren't considered lepers. It feels like a double standard and pulling the ladder up, so even if the next generation of startup programmers get work, they'll be "tainted" by starti…

This comment is so confusing. You first seemed to take offense at the term "cryptocrap" but then here call crypto "pointless/destructive." Facebook is obviously mostly garbage these days (IMO) however I think it's hard to argue that it provides no utility to people. My family members are spread out across four different countries and mostly stay connected via Facebook. I'd argue that Facebook provides more utility to people than crypto at this point. That says a lot more about crypto than it does about Facebook.

Re: GitHub Actions Pitfalls

#47
post #30

Their self-hosted runners are pretty jank. If your workflow writes something to the docker container's user's home directory, you will see it in the next workflow you run. Due to this and other things, I need a "preamble" action that needs to run right after checkout. Oh, if don't checkout at the beginning of your workflow, you will be using the previous workflow's copy of the repository. I'm 100% sure they don't use…

it's not about security or sanity, it's because people run containers whose UIDs do not match the host system, and they write to the host system by mounting volumes for the container to use.

the result is root or another user inside the container can write root-owned files because they have the same UID as root on the container host.

my employer runs an orchestrator and destroys each runner VM after a single job so this only bites the user who causes it, and not anyone else.

Re: GitHub Actions Pitfalls

#48

I've used Github Actions at work for the past year and I'm a fan overall. The clearest sign of this is my feedback for improvement is almost entirely about missing features instead of broken ones. For examples, it'd be nice: 1. for Github to natively allow CI management for several repos in a centralized way, so repo setup can just be "select this CI config" instead of "copy this YAML file and change the project name…

Me, I looove that the actions config has to be in a file in the repo , so I know where to find it, and if I have read access to the repo, I have access to the config. (Don't even need to be logged into a GH acct, although I usually am). If they allowed config to come from an internal setting not visible in repo, i'm sure repos I collaborate with would start using that feature, and I would not be able to find their Ac…

[deleted]

Re: GitHub Actions Pitfalls

#49
post #33

Another surprise: "ubuntu-latest" is not the latest ubuntu! It is stuck at 20.04. If you want 22.04 you need to specify "ubuntu-22.04". Similar issue with macos-latest.

well that is clearly specified in the docs.

"ubuntu-latest" isn't necessarily the latest Ubuntu, it's the latest version that has been fixed to the point of having no workflow-breaking known issues, I believe.

Re: GitHub Actions Pitfalls

#50
post #17

Another pitfall I have encountered is the lack of a true ephemeral agent runner solution for running the actions runner agent in your own infrastructure. The way it works (the last time I checked) is when you register a worker as "ephemeral: true" it automatically deregisters itself from your runner pool and kills the agent process when a job is completed, but it is up to you to clean things up. This leads to somewha…

actions-runner-controller has been worked on by GitHub for a while and is effectively an official project. I don't think the distinction is important at this point.

my employer used some code from philips-labs to support ephemeral runners. works great after a few customizations.

I wrote a shell script and a very small Go program to support ephemeral MacOS runners on-premise.

these things are so fun to work on.

Post reply on HN