Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Comments on GitHub action triggered by somebody else's repository

Post

GitHub action triggered by somebody else's repository

+6
−0

Consider the following situation:


To make sure that my package stays compatible with the development of the class, I'd like to regularly run a GitHub Action in my repository to test this. At the moment, I run it on a schedule once a week:

name: Check with current ltx-talk

on:
  schedule:
    - cron: '47 13 * * 3'

Is it somehow possible to trigger this action based on events in the ltx-talk repository? For example every time a new version gets released or for every commit? I've read about repository_dispatch, but it seems this would require changes in the triggering repository.

In case it helps, I also have a fork of the ltx-talk repository, which is automatically kept up-to-date using Probot Pull.

History

4 comment threads

Fork + repositorydispatch (4 comments)
What about git submodule? (5 comments)
Use a third service? (1 comment)
I also want this (4 comments)
What about git submodule?
mr Tsjolder‭ wrote 4 months ago

Not sure if it would work for this use-case, but have you considered git submodules? They seem to be designed to slightly modify projects your code depends on (e.g. to make repository_dispatch work).

samcarter‭ wrote 4 months ago

Thanks for the idea! I experimented with git submodules in the past and the problem is that I have all my latex repositories checked out in my local texmf tree. The submodules will add additional copies of the files there, which will result in unpredictable behaviour of tex, which of the multiple copies of a file it will use. This makes any form of latex development very hard and I had to abandon submodules. Unless there is a way to use submodules without having them in the local repository, I don't think I can use them.

Michael‭ wrote 4 months ago

Unless there is a way to use submodules without having them in the local repository,

It sounds like one of the submodule configurations lets you do that:

  • Deinitialized submodule: A gitlink, and a .gitmodules entry, but no submodule working directory. The submodule’s Git directory may be there as after deinitializing the Git directory is kept around. The directory which is supposed to be the working directory is empty instead.

    A submodule can be deinitialized by running git submodule deinit. Besides emptying the working directory, this command only modifies the superproject’s $GIT_DIR/config file, so the superproject’s history is not affected. This can be undone using git submodule init.

Michael‭ wrote 4 months ago

For what it's worth, this ending up pushing me down a path wherein I (who also wanted something like this) converted the external repo to a submodule. I have Dependabot configured to make PRs when it notices that that repo has updates.

Then, I can test the changed dependency, make sure my code works with it correctly, push to the PR branch, and merge when I'm happy.

Dependabot is still effectively a cron, though. If you were to rely on activity in your Probot, I think it would work out the same.

samcarter‭ wrote 4 months ago

Michael‭ It would be great if you would summarise your approach in an answer!