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

workflows: periodically check for updates #139

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

bgilbert
Copy link
Member

Automatically check for updates once a week, whenever wraps are updated, or on demand. Have @openslide-bot maintain a PR with updates from wrapdb, and an issue for any remaining updates reported by ./build.sh updates.

We need to do this in the context of @openslide-bot, rather than the GITHUB_TOKEN, because PRs created by the GITHUB_TOKEN can't put their head branch in a fork, and don't automatically run CI. However, we want to label the issues and PRs, which would require giving @openslide-bot permissions on the repo. Instead, we have a second, privileged workflow to detect and label these issues/PRs.

Since the workflow maintains the PR branch in @openslide-bot's fork, which may have a stale main branch with different Actions workflows, the bot token must have the workflow scope to allow updating workflows in the branch. Workflows have been disabled in the fork to minimize the effects.

To support this, allow the ./build.sh updates command to run without a suitable cross-compiler available.

probe() requires a cross-compiler with the win32 threading model, which
effectively limits us to the builder container.  Update checking doesn't
need any of the configuration done by probe(), and it's convenient to run
it outside the container.

Signed-off-by: Benjamin Gilbert <[email protected]>
Automatically check for updates once a week, whenever wraps are updated,
or on demand.  Have openslide-bot maintain a PR with updates from wrapdb,
and an issue for any remaining updates reported by `./build.sh updates`.

We need to do this in the context of openslide-bot, rather than the
GITHUB_TOKEN, because PRs created by the GITHUB_TOKEN can't put their
head branch in a fork, and don't automatically run CI.  However, we want
to label the issues and PRs, which would require giving openslide-bot
permissions on the repo.  Instead, we have a second, privileged workflow
to detect and label these issues/PRs.

Since the workflow maintains the PR branch in openslide-bot's fork, which
may have a stale main branch with different Actions workflows, the bot
token must have the `workflow` scope to allow updating workflows in the
branch.  Workflows have been disabled in the fork to minimize the
effects.

Signed-off-by: Benjamin Gilbert <[email protected]>
@bgilbert bgilbert enabled auto-merge September 29, 2023 07:57
@openslide-bot
Copy link
Contributor

DCO signed off ✔️

All commits have been signed off. You have certified to the terms of the Developer Certificate of Origin, version 1.1. In particular, you certify that this contribution has not been developed using information obtained under a non-disclosure agreement or other license terms that forbid you from contributing it under the GNU Lesser General Public License, version 2.1.

@bgilbert bgilbert merged commit 041f2c1 into openslide:main Sep 29, 2023
10 checks passed
@bgilbert bgilbert deleted the monitoring branch September 29, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants