From 80cb56fe93958ef2a53cdc3095c08a5169b6495e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20=C5=BBydek?= Date: Thu, 30 Nov 2023 13:31:05 +0200 Subject: [PATCH] ci: simplify pr action --- .../{create-pr-to-main.yml => create-pr.yml} | 12 ++++-------- .github/workflows/sync-main-with-test.yml | 18 ------------------ 2 files changed, 4 insertions(+), 26 deletions(-) rename .github/workflows/{create-pr-to-main.yml => create-pr.yml} (59%) delete mode 100644 .github/workflows/sync-main-with-test.yml diff --git a/.github/workflows/create-pr-to-main.yml b/.github/workflows/create-pr.yml similarity index 59% rename from .github/workflows/create-pr-to-main.yml rename to .github/workflows/create-pr.yml index 321af97d..2692bc1b 100644 --- a/.github/workflows/create-pr-to-main.yml +++ b/.github/workflows/create-pr.yml @@ -1,19 +1,15 @@ -name: Create PR to Main +name: Create PR on: release: types: - published -permissions: - pull-requests: write - contents: read - jobs: - create-pr-to-main: - name: Build project and run CI checks + create-pr: + name: Create PR uses: fingerprintjs/dx-team-toolkit/.github/workflows/create-pr.yml@v1 with: - target_branch: test + target_branch: ${{ github.event.release.prerelease && 'main' || 'test' }} tag_name: ${{ github.event.release.tag_name }} prerelease: ${{ github.event.release.prerelease }} diff --git a/.github/workflows/sync-main-with-test.yml b/.github/workflows/sync-main-with-test.yml deleted file mode 100644 index 7bd890fa..00000000 --- a/.github/workflows/sync-main-with-test.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Sync test with main - -on: - push: - branches: - - main - -permissions: - pull-requests: write - contents: read - -jobs: - sync-test-with-main: - name: Build project and run CI checks - uses: fingerprintjs/dx-team-toolkit/.github/workflows/create-pr.yml@v1 - with: - target_branch: main - prerelease: false