adafruit / adafruit/Adafruit_CircuitPython_Bundle

Should we diable folder-image generation for other forks?

Open
#404 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
1k
Forks
205
Avg merge
5h 34m
Merged PRs (30d)
4

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect .github/workflows/images.yml around lines 7-10 and compare the owner check shown in circuitpython's .github/workflows/build.yml around line 118. Confirm the scheduled image workflow is limited to the adafruit owner, then check whether the same decision should be applied in the Learn Guide repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.