diff --git a/.github/workflows/chore.yml b/.github/workflows/chore.yml index c145c7f..4d19ac4 100644 --- a/.github/workflows/chore.yml +++ b/.github/workflows/chore.yml @@ -16,26 +16,31 @@ 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: ${{ steps.app-token.outputs.token }} - 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 fetch origin + git switch 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 - - name: Build docs - if: startsWith(github.event.pull_request.head.ref, 'docs/') - run: foo - publish-docs: - name: Publish Documentation + name: Publish documentation runs-on: ubuntu-latest - if: startsWith(github.event.pull_request.head.ref, 'docs/') + if: startsWith(github.event.pull_request.head.ref, 'docs/') || startsWith(github.event.pull_request.head.ref, 'release/') permissions: id-token: write pages: write @@ -66,3 +71,6 @@ jobs: - name: Deploy pages uses: actions/deploy-pages@v4 + +permissions: + contents: write diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 9665c9f..29f73bf 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -4,6 +4,7 @@ on: pull_request: branches: - 'develop' + - 'main' jobs: run-tests: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f020333..3cfdd7b 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