I believe pull request from forks are not triggered by default because some people where using this to mine cryptocrap on cpu using the quotas of other projects.
Quoted post unavailable.
GitHub Actions Pitfalls
71–80 of 111 posts
Re: GitHub Actions Pitfalls
#72If you want to run github actions locally before any pitfalls, you can try out https://github.com/nektos/act
Re: GitHub Actions Pitfalls
#73For example, I'd like to build an action that triggers a documentation update based on the path and filename that is changed.
on:
push:
branches:
- main
paths:
- */README.md
But there does not appear to be a way to pass a list of changed paths to the job.Re: GitHub Actions Pitfalls
#74A few other pitfalls: * Scheduled actions basically never run anywhere close to on schedule. If you schedule something to run every 13 minutes, it may just run 1-3 times an hour with random 30 minute to 1 hour waits in between executions. * Triggering a workflow as a result of an action from another workflow doesn't work if you're using the GITHUB_TOKEN as part of the action. Github does this to prevent accidental re…
Re: GitHub Actions Pitfalls
#75I generally like Actions but occasionally run into limitations (possibly my own). For example, I'd like to build an action that triggers a documentation update based on the path and filename that is changed. on: push: branches: - main paths: - */README.md But there does not appear to be a way to pass a list of changed paths to the job.
on:
push:
branches:
- main
paths:
- docs/**
- README.md
I use something similar for triggering different app workflows in a monorepo.*EDIT* Or in multiple directories but grouped into multiple documentation directories.
on:
push:
branches:
- main
paths:
- package1/docs/**
- package2/docs/**
- package3/docs/**
- README.mdRe: GitHub Actions Pitfalls
#76Dear GitHub actions. I want &pointers so I don’t have to repeat myself. Also, I like that you build the hypothetical merge of branch + main. But that commit SHA is gone after that successful build. Give me a way to track this. I need to store artifacts related to this build, as I don’t want to build those again!
https://docs.github.com/en/actions/using-workflows/storing-w...
they do seem to be capable of saving most things people call artifacts or if you are looking for something more along the lines of caching parts of the build for future builds, you can adjust it pretty easily by adjusting what the cache key is based on.
example:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
which will allow you to cached based on the hash of a specific deps lock file instead of the commit sha.https://docs.github.com/en/actions/using-workflows/caching-d...
https://github.com/actions/cache
The one note here is clearing that cache/cache management isn't straight forward currently (although they are improving it), there are a few acceptable workarounds though.
Not sure if you were aware of these already.
Re: GitHub Actions Pitfalls
#77I 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.
Re: GitHub Actions Pitfalls
#78If you want to run github actions locally before any pitfalls, you can try out https://github.com/nektos/act
Re: GitHub Actions Pitfalls
#79I 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
#80Earlier quoted context omitted.
You might be getting the string True because in Yaml 1.1 the scalars “y”, “n”, “yes”, “no”, “on”, and “off” (in all their casings) are Boolean literals. I believe YAML supports non-string keys, so your key would be parsed to the corresponding Boolean value (true), if the pipeline then goes through JSON where only string keys are supported the serialiser could simply stringing the key rather than raise an error, leadi…
I once worked on a project where the input was YAML config files and a lot of different programs would read/write the files. Every different parser had at least one implementation-specific quirk. Often we would run into the quirks because someone edited the YAML by hand, and one parser would handle it fine, while another would barf. That's when I found out the YAML spec explicitly says it's human- readable , not huma…
For those interested, the problem was with the string "08". At least at the time, the pyYAML generator I was using would render it as 08 (without quotes), which is not parsable as a number because the leading 0 indicates the number is in octal, but 8 isn't a valid octal digit. Since it wasn't parsable as a number, it should default to being treated as a string. However the golang parser disagreed and instead raised an error because "8" was not a valid octal digit.