2020-08-20 15:30:27 +02:00
|
|
|
name: PostHog FOSS
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
repo-sync:
|
|
|
|
name: Sync posthog-foss with posthog
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Sync repositories 1 to 1
|
|
|
|
uses: ungless/git-sync@master # tag syncing is not currently part of wei/git-sync
|
|
|
|
with:
|
|
|
|
source_repo: "https://${{ secrets.SYNC_GITHUB_TOKEN }}@github.com/posthog/posthog.git"
|
|
|
|
source_branch: "master"
|
|
|
|
destination_repo: "https://${{ secrets.SYNC_GITHUB_TOKEN }}@github.com/posthog/posthog-foss.git"
|
|
|
|
destination_branch: "master"
|
|
|
|
- name: Checkout posthog-foss
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: "posthog/posthog-foss"
|
|
|
|
ref: master
|
|
|
|
token: ${{ secrets.SYNC_GITHUB_TOKEN }} # SYNC_GITHUB_TOKEN is a PAT token with the workflows scope which is not in GITHUB_TOKEN
|
2020-08-20 15:59:52 +02:00
|
|
|
- name: Commit "Sync and remove all non-FOSS parts"
|
2020-08-20 15:30:27 +02:00
|
|
|
uses: EndBug/add-and-commit@v4
|
|
|
|
with:
|
|
|
|
author_name: PostHog Bot
|
|
|
|
author_email: hey@posthog.com
|
2020-08-20 15:59:52 +02:00
|
|
|
message: "Sync and remove all non-FOSS parts"
|
2020-08-20 15:30:27 +02:00
|
|
|
remove: "-r ee/"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.SYNC_GITHUB_TOKEN }}
|