From b20b16ad6e0d5fe1b7a724891a228f7a6f40e6f5 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Tue, 13 Jun 2023 19:11:08 +0200 Subject: [PATCH] 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 --- .github/workflows/foss-sync.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/foss-sync.yml b/.github/workflows/foss-sync.yml index 74cd9edd2ed..82334bfe89f 100644 --- a/.github/workflows/foss-sync.yml +++ b/.github/workflows/foss-sync.yml @@ -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