Adafruit_CircuitPython_Bundle icon indicating copy to clipboard operation
Adafruit_CircuitPython_Bundle copied to clipboard

Should we diable folder-image generation for other forks?

Open FoamyGuy opened this issue 3 years ago • 0 comments

The images.yml file has a scheduled task that runs once per day to generate the folder images for all example code from the libraries in the bundle. https://github.com/adafruit/Adafruit_CircuitPython_Bundle/blob/62906dc5e598ebb7dc37c529d681acdd104901ee/.github/workflows/images.yml#L7-L10

It seems this scheduled task runs on all forks of this repo (assuming their default branch is up-to-date enough to contain the images.yml file). Here is an output from that workflow running in my fork: https://github.com/FoamyGuy/Adafruit_CircuitPython_Bundle/actions/runs/3162062950 I checked one or two others at random and did find more with the scheduled workflow in it.

Should we add some sort of limitation that makes this action only run for the adafruit org fork of the repo's instead of everyones? The generated images in adafruit org are the only ones that are widely used AFAIK

We use a limitation like that here: https://github.com/adafruit/circuitpython/blob/bced76887e49e0a30a0e116ef5a4feed7f3d240e/.github/workflows/build.yml#L118

github.repository_owner == 'adafruit'

It could perhaps be used similarly in this image generator workflow to limit it so it won't run for other users (unless they modify the workflow.yml file to change it).

If we decide to make this change, it's probably worthwhile to do the same thing over in the Learn Guide repo because It uses the same type of cron scheduled workflow that also seems to run for other users as well.

FoamyGuy avatar Sep 30 '22 23:09 FoamyGuy