We have a specific process we are looking to port from circleCI potentially if this works
- Developer post PR
- CI job 'buildMyStuff' triggers off the PR (or any changes except to .REAL_VERSION)
- CI job 'buildMyStuff' adds and commits .REAL_VERSION with circleCI build number(used in git tag and CD in deploy job)
- Here we want to prevent CI job 'buildMyStuff' doing a recursive build as it sees the PR changed (because it pushed .REAL_VERSION)
- Developer sees build pass and 1 day later merge squashes into master/main branch
- Now job "deployMyStuff' runs and does git tag using contents of .REAL_VERSION so it can re-use the artifacts built from CI in the previous step #2 since they are 100% guaranteed to be the same and do not need rebuilding(saving a ton of time and build credits). It also deploys to staging environment
NOTE on step #5 - If branch is not up to date with master, developer has to click update to master kicking off a new build again (you have to be up to date with master AND CI passing before merge)
Now, in circleCI, committing .REAL_VERSION triggers another build(ie. step 4 above) and using their special [ci skip] does not work since that results in skipping the next build AND THEN the deploy job too(ie. steps 4 and .
Basically, we want a CI build to commit ONE file during PR but not trigger any builds either ignoring because of
- author of commit (circleci user perhaps)
- OR [ci skip 'job name'] in comment of git message
- OR never build on changes to .REAL_VERSION
- OR something else to prevent that 1 build
Can we do this on github builds?
In regards to ignoring certain files in the trigger, you can scope this with the paths-ignore option.
on:
push:
branches:
- main
paths-ignore:
- '.REAL_VERSION'