You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if we could list these actions on the marketplace for better visibility.
@Tjitse-E was the original one to point this out, but the common pattern for actions is to put them in their own repo.
Luckily enough, since this is a git repo, doing sub-repo splits and tagging is actually quite easy.
I have an action that already does this:
name: "Publish Subtree"author: "Graycore"description: "A Github Action that publishes a subdirectory of a monorepo to another repo"inputs:
targetRepo:
description: repository to sync the files torequired: truesourceDir:
description: sub-directory that will be the source of the repositoryrequired: truetoken:
description: Github Tokenrequired: truesyncBranch:
default: sync-branchdescription: temporary branch that will be used for syncingrequired: falseruns:
using: compositesteps:
# Add the target repository as a remote and fetch its branches
- name: Add target repo and fetch branchesrun: | git remote add target https://oauth2:${{ inputs.token }}@${{ inputs.targetRepo }} git fetch targetshell: bash# Sync the subdirectory using git subtree
- name: Create subtree branchrun: | git subtree split --prefix=${{ inputs.sourceDir }} -b ${{ inputs.syncBranch }}shell: bash# Push the changes to the target repository
- name: Push changes to target reporun: | git push target ${{ inputs.syncBranch }}:mainshell: bash# Create tag and push to target repo if triggered by tag event
- name: Create tagif: github.ref_type == 'tag'shell: bashrun: | git checkout ${{ inputs.syncBranch }} git config --global user.email "automation@graycore.io" git config --global user.name "Beep Boop" git tag -a subtreetag -m ${{ github.ref_name }} git push target subtreetag:${{ github.ref_name }}
But I haven't published it anywhere public. Feel free to use it, I'm stating it as MIT-licensed.
Your Use Case
As a developer, I want to see these actions listed on the Github Marketplace.
The text was updated successfully, but these errors were encountered:
💡 Feature request
Feature Name
Github-Actions Monorepo splitter.
The Desired Behavior
It would be great if we could list these actions on the marketplace for better visibility.
@Tjitse-E was the original one to point this out, but the common pattern for actions is to put them in their own repo.
Luckily enough, since this is a git repo, doing sub-repo splits and tagging is actually quite easy.
I have an action that already does this:
But I haven't published it anywhere public. Feel free to use it, I'm stating it as MIT-licensed.
Your Use Case
As a developer, I want to see these actions listed on the Github Marketplace.
The text was updated successfully, but these errors were encountered: