Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/studistcorporation/actions-repo-file-sync
https://github.com/studistcorporation/actions-repo-file-sync
terraform-managed
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/studistcorporation/actions-repo-file-sync
- Owner: StudistCorporation
- License: mit
- Created: 2022-12-01T12:35:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-23T05:24:08.000Z (6 months ago)
- Last Synced: 2024-10-29T02:46:06.551Z (3 months ago)
- Topics: terraform-managed
- Language: TypeScript
- Homepage:
- Size: 390 KB
- Stars: 3
- Watchers: 12
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Repo File Sync
This action will synchronizes files from the specified repository and creates a Pull Request with generated GitHub App token.
## Architecture
This action synchronizes files from the source repository to the repository where using that.
```mermaid
graph LRR[Repo]
SR1[Source Repo#1]
SR2[Source Repo#2]SR1 --> R
SR2 --> R
```## Usage
Create `.github/repo-file-sync.yaml`.
This file contains the settings for repositories and files to be copied from.```yaml
# .github/repo-file-sync.yaml
StudistCorporation/common:
- .github/workflows/labeler.yaml
- .github/ISSUE_TEMPLATE/
StudistCorporation/k8s-common:
- aqua.yaml
```And create workflow.
```yaml
# .github/workflows/repo-file-sync.yaml
steps:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}- name: Sync files
uses: ./.github/actions/sync-files
with:
token: ${{ steps.generate_token.outputs.token }}
username: john
email: [email protected]
```## Inputs
### token
The `token` to used for authenticating with GitHub.
### username
The `username` to use in the git commit.
The `email` to use in the git commit.
### reviewers
The `reviewers` to use in the pull request to be created.
If you specify a team, specify it to `team_reviewers` instead of `reviewers`.### team_reviewers
The `team_reviewers` to use in the pull request to be created.
If you specify a user, specify it to `reviewers` instead of `team_reviewers`.### work_ref
The `work_ref` to use in a branch for the pull request to be created.