Skip to content

ci.github: add preview-build workflow #6425

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

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

bastimeyer
Copy link
Member

Closes #6424

This new preview-build workflow triggers the preview-build workflows on the streamlink/windows-builds and streamlink/streamlink-appimage repos whenever something was pushed to master and either pyproject.toml, setup.py, MANIFEST.in or src/** was modified:

These two links are added to the run's summary markdown text, so users can find the build artifacts easily when clicking the workflow here. Unfortunately, direct links in the summary can't be included, as the workflow here merely triggers the workflows on the other repos. GitHub doesn't include a workflow run ID in its API response.

The docs have also been updated accordingly. I will remove the nightly workflows from the repos after this PR here was merged. The recent runs and their build artifacts should remain for 90 days (until expiration) when deleting workflow files.

I've checked and triggered the workflows using a GH PAT, but I don't know if secrets.GITHUB_TOKEN with permissions.actions=write also has the permissions to trigger a workflow on other repos. If it doesn't, then I will have to add a PAT for the @streamlinkbot and use that instead.

Does the on.push config here look fine? Not 100% sure... Tags pushed should be ignored and the paths should be correct.

@gravyboat
Copy link
Member

gravyboat commented Feb 7, 2025

Does the on.push config here look fine?

Does that syntax work? I thought you still had to provide it a list of objects for both the branch and the tags so something like:

on:
  push:
    branches:
      - master
    tags-ignore:
      - '**'
    paths:
      - "pyproject.toml"
      - "setup.py"
      - "MANIFEST.in"
      - "build_backend/**"
      - "src/**"

per the documentation here (include) and here (exclude)

@bastimeyer bastimeyer force-pushed the ci/github/preview-build branch from 5bb8e91 to d16f06d Compare February 7, 2025 09:37
@bastimeyer
Copy link
Member Author

Thanks. True. No idea what I was thinking there...

I also temporarily added a PR trigger to test the API permissions, and it looks like the permissions won't work (403 - "Resource not accessible by integration").
https://github.com/streamlink/streamlink/actions/runs/13197133321/job/36840773490?pr=6425#step:3:19

Going to have to use a PAT

@bastimeyer bastimeyer force-pushed the ci/github/preview-build branch from d16f06d to 1049231 Compare February 7, 2025 09:50
@bastimeyer bastimeyer force-pushed the ci/github/preview-build branch from 1049231 to be85ea7 Compare February 7, 2025 09:53
@bastimeyer
Copy link
Member Author

PAT + write permissions added for @streamlinkbot (copy sent to streamlink@protonmail.com)

Tested by running curl locally and building AppImages from this PR branch (we're only triggering workflows from the master branch however):
https://github.com/streamlink/streamlink-appimage/actions/runs/13197448703

Going to merge this now. Should be fine...

Afterwards I'm going to delete the nightly build workflows from both repos. As said, old runs with their build artifacts should be kept until they expire.

Btw, there's a known issue with GH's new public ubuntu-24.04-arm runners and their docker service, which sometimes fails to initialize and runners will sometimes fail randomly.

@bastimeyer bastimeyer merged commit 65be3cd into streamlink:master Feb 7, 2025
23 checks passed
@bastimeyer bastimeyer deleted the ci/github/preview-build branch February 7, 2025 10:11
@bastimeyer
Copy link
Member Author

The nightly CI workflow runs can't be selected anymore on the two repos, but their external links in the current stable docs are still working:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace nightly builds of Windows installer+portable and Linux AppImage
2 participants