Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create-pr option for timelapse workflow #16

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

nberlette
Copy link
Owner

@nberlette nberlette commented Oct 12, 2023

This PR adds an option to the Timelapse workflow for creating an auto-generated pull request for the newly generated timelapse video.

If the option is disabled, the video will just be uploaded as a workflow artifact with a retention period of 90 days. Otherwise, a new branch is created for the new file(s), and a simple PR with some of the video details is published using the GitHub CLI.

This also adds a debug log artifact step to the workflow, which captures the ffmpeg output to a temporary file and uploads it as a workflow artifact as well.

@nberlette nberlette added enhancement New feature or request good first issue Good for newcomers timelapse Pull Requests for timelapse videos. labels Oct 12, 2023
@nberlette nberlette self-assigned this Oct 12, 2023
@nberlette nberlette force-pushed the feat/timelapse-create-pr-option branch from 2b982f8 to 477612d Compare October 12, 2023 18:41
Copy link
Owner Author

@nberlette nberlette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😛

.github/workflows/timelapse.yml Outdated Show resolved Hide resolved
@nberlette
Copy link
Owner Author

Alright, refactored the workflow and did a couple test runs. Seems to be performing pretty well.

The performance gains from using git's new(ish) sparse-checkout feature in combination with the cache action are tremendous. It just clocked in at a little over 8 minutes to generate a 17 minute video from 6 weeks of images. For reference, the scraper collects an average of ~115 images per day (5-6 per hour), equating to just about 5,000 images for the 6 week test period.

It's still absolutely horrendous in terms of DRY and code quality... And there is still a lot of room for further optimizations and improvements. But hey, it works 🤷🏼‍♂️

Still need to work out some logic for the scheduled trigger side of things. Until then, that feature will remain disabled and relegate this to manual workflow dispatches only.

SHIP IT

@nberlette nberlette merged commit 1de2fb4 into main Oct 13, 2023
@nberlette nberlette deleted the feat/timelapse-create-pr-option branch October 13, 2023 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers timelapse Pull Requests for timelapse videos.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant