From 68eca9c0130ac6092ca1f471695bc4b1956e00ef Mon Sep 17 00:00:00 2001 From: Mihails Delmans Date: Wed, 5 Feb 2025 15:16:53 +0000 Subject: [PATCH 1/3] Add gitflow app to chore workflow --- .github/workflows/chore.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/chore.yml b/.github/workflows/chore.yml index d3e433c..c24e96b 100644 --- a/.github/workflows/chore.yml +++ b/.github/workflows/chore.yml @@ -16,19 +16,25 @@ jobs: runs-on: ubuntu-latest steps: + - name: Get Gitflow App token + uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.GITFLOW_APP_ID }} + private-key: ${{ secrets.GITFLOW_APP_KEY }} + - name: Checkout Repository uses: actions/checkout@v4 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ steps.app-token.outputs.token }} + ref: develop - name: Merge Source Branch into Develop run: | git config --global user.name "bot" git config --global user.email "bot@colorifix.com" - git fetch - git checkout develop git merge --no-ff origin/${{ github.event.pull_request.head.ref }} -m "Merge ${{ github.event.pull_request.head.ref }} into develop" - git push origin develop -f + git push origin develop publish-docs: name: Publish Documentation From 62e73dce6fa6914fa27d7799565531f6a2a09e24 Mon Sep 17 00:00:00 2001 From: Mihails Delmans Date: Wed, 5 Feb 2025 15:18:16 +0000 Subject: [PATCH 2/3] Add gitflow app to the release workflow --- .github/workflows/release.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 943616d..9aaf222 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,14 @@ jobs: (github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')) steps: + + - name: Get Gitflow App token + uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.GITFLOW_APP_ID }} + private-key: ${{ secrets.GITFLOW_APP_KEY }} + - name: Gitflow action id: gitflow-action uses: hoangvvo/gitflow-workflow-action@0.3.7 @@ -35,7 +43,7 @@ jobs: version_increment: ${{ contains(github.head_ref, 'hotfix/') && 'patch' || '' }} dry_run: ${{ inputs.dry_run }} env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} - name: Checkout code uses: actions/checkout@v4 From f3ec9d8f9190ade8b565bbee7f876ae0909b29ea Mon Sep 17 00:00:00 2001 From: Mihails Delmans Date: Wed, 5 Feb 2025 15:23:15 +0000 Subject: [PATCH 3/3] Add test job for pulling into main --- .github/workflows/pull.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index fefe86c..fbee754 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -4,7 +4,7 @@ on: pull_request: branches: - 'develop' - + - 'main' jobs: run-tests: if: true