This Github Action can come in handy when you have lot of projects like i do. where in some case certain projects users action workflow which are common across projects. Example : Project 1
& Project 2
it can be pain to keep all the workflow updated with Github Action's Module's version.
This also isn't limited to Github Action yaml files.
Another use case could be keeping the .editorconfig
, LICENSE
, tsconfig.json
, tslint.json
, .gitignore
, azure-pieplines.yml
, etc. in sync across all your repositories.
Here where this action comes in and reduces your stress 😉 it can update all your repository actions file based on the config provided
How Files Sync Work ?
Before copying the WORKFLOW_FILES
from the source to destination. this action will provide some flexibility. this searches for a file in various locations for example lets take settings.yml
as the file that you want to sync for multiple repository
Below are the locations that this action search for the file/folder
./{OWNER}/{REPO_NAME}/workflows/{filename}
./{OWNER}/workflows/{filename}
./{WORKFLOW_FILES_DIR}/{filename}
./.github/workflows/{filename}
./{OWNER}/{REPO_NAME}/{filename}
./{OWNER}/{filename}
./{filename}
if the
settings.yml
is found insideworkflows
folder then the destination is automatically forced to.github/workflows
in the destination repoif the
settings.yml
is outside ofworkflows
folder then the destination then its copied to the destination
How this can be useful ?
Lets assume that you want to maintain all the common github files in a single repository and suddenly a repository needs a single file to be changed in that case instead of editing the action yml file. you can just create a folder like {REPO_OWNER}/{REPO_NAME}/{FILE}
to copy the overriden file to the destination
varunsridharan / action-github-workflow-sync
Github Action To Sync Github Action's Workflow Files Across Repositories
Github Workflow Sync - Github Action
Github Action To Sync Github Action's Workflow Files Across Repositories
Use Case 🤔 ?
This Github Action can come in handy when you have lot of projects like i do. where in some case certain projects users action workflow which are common across projects. Example : Project 1 & Project 2 it can be pain to keep all the workflow updated with Github Action's Module's version.
This also isn't limited to Github Action yaml files - another use case could be keeping the .editorconfig
, LICENSE
, tsconfig.json
, tslint.json
, .gitignore
, azure-pieplines.yml
, etc. in sync across all your repositories.
Here where this action comes in and reduces your stress
😉 it can update all your repository actions file based on the config provided
⚙️ Configuration
Argument | Defaults | Description |
---|---|---|
GITHUB_TOKEN |
- |
Required Token to use to get repos and write secrets. ${{secrets.GITHUB_TOKEN}} |
Top comments (0)