AndreasAugustin / AndreasAugustin/actions-template-sync

[Feat]: Template synchronization across multiple github organization

Aperta
#586 15 commenti 1 reazione 1 assegnatario Rivendicata da @AndreasAugustin Vedi su GitHub
enhancement
Lingua principale
Shell
Stelle
326
Fork
56
Merge medio
7h 21m
PR unite (30g)
8

Descrizione

### Describe the feature

Supporting for template synchronization for multiple GitHub organization. If you work with private repository within an Enterprise Organization, the token of a GitHub app are bound to one organization only.

Currently, the template synchronization GitHub action uses only one github_token. If the scripts could use multiple github_token or if you could specify a source and destination github token that are being used later on, you could have template synchronization most likely across multiple GitHub organization under an enterprise umbrella. The teams would be required to somehow "share" the credentials and figure out a least privilege approach but the synchronization could be possible I guess.

Within the action it could look like this:
`

- uses: actions/create-github-app-token@v1
id: app-token-org-destination
with:
app-id: ${{ secrets.ORG_DESTINATION_APP_ID }}
private-key: ${{ secrets.ORG_DESTINATION_PRIVATE_KEY }}

- uses: actions/create-github-app-token@v1
id: app-token-org-source
with:
app-id: ${{ secrets.ORG_SOURCE_APP_ID }}
private-key: ${{ secrets.ORG_SOURCE_PRIVATE_KEY }}

- name: actions-template-sync
uses: AndreasAugustin/actions-template-sync@v2
with:
source_github_token: ${{ steps.app-token-org-source.outputs.token }}
source_repo_path: Uniper-Streaming-Integration-Platform/confluent-cloud-terraform-template
destination_github_token: ${{ steps.app-token-org-destination.outputs.token }}
upstream_branch: main`
`
The push function would most like need to use the token of the destination as far as I could figure out.

### Use Case

Support template synchronization across multiple GitHub organization with private repositories

### Proposed Solution

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.