0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:40:03 +01:00

ci: Try to fix sync with posthog-foss v2 (#15700)

* Try a different fix

* Test on PR

* Fix commit SHA

* Hard-code commit ref

* Update `EndBug/add-and-commit`

* Don't run on PRs

This was just for testing.

* Use v3 of PostHog/git-sync
This commit is contained in:
Michael Matloka 2023-06-13 19:11:08 +02:00 committed by GitHub
parent 352dc85956
commit b20b16ad6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,19 +12,15 @@ jobs:
if: github.repository == 'PostHog/posthog'
runs-on: ubuntu-latest
steps:
- name: Avoid HTTP/2 woes # See https://github.com/orgs/community/discussions/55820
run: |
git config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400
- name: Sync repositories 1 to 1 - master branch
uses: wei/git-sync@v3
uses: PostHog/git-sync@v3
with:
source_repo: 'https://posthog-bot:${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}@github.com/posthog/posthog.git'
source_branch: 'master'
destination_repo: 'https://posthog-bot:${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}@github.com/posthog/posthog-foss.git'
destination_branch: 'master'
- name: Sync repositories 1 to 1 tags
uses: wei/git-sync@v3
uses: PostHog/git-sync@v3
with:
source_repo: 'https://posthog-bot:${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}@github.com/posthog/posthog.git'
source_branch: 'refs/tags/*'
@ -46,10 +42,11 @@ jobs:
ls | grep -v foss-release-image-publish.yml | xargs rm
- name: Commit "Sync and remove all non-FOSS parts"
uses: EndBug/add-and-commit@v7
uses: EndBug/add-and-commit@v9
with:
message: 'Sync and remove all non-FOSS parts'
remove: '["-r ee/"]'
default_author: github_actions
github_token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
- run: echo # Empty step so that GitHub doesn't complain about an empty job on forks
repository: 'posthog/posthog-foss'
ref: master