Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Add workflow to create a pr to merge latest release into dev

Christophe Bliarded8372133602
diff --git a/.github/workflows/create-merge-release-into-dev-pr.yml b/.github/workflows/create-merge-release-into-dev-pr.yml
new file mode 100644
index 00000000000..310d82cfcb6
--- /dev/null
+++ b/.github/workflows/create-merge-release-into-dev-pr.yml
@@ -0,0 +1,45 @@
+name: create-merge-release-into-dev-pr
+on:
+ workflow_dispatch:
+
+permissions: {}
+jobs:
+ setup:
+ runs-on: ubuntu-latest
+ outputs:
+ latest_release_branch: ${{ steps.find_latest_release.outputs.branch }}
+ steps:
+ - id: find_latest_release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_REPOSITORY: ${{ github.repository }}
+ run: |
+ BRANCH=$(curl -H "Authorization: token $GITHUB_TOKEN" \
+ https://api.github.com/repos/$GITHUB_REPOSITORY/branches?protected=true | \
+ jq -r .[].name | grep "release/" | sort --reverse | head -1
+ )
+ if [ "$BRANCH" = "" ]; then
+ echo "Invalid release branch found: $BRANCH"
+ exit 1
+ fi
+
+ echo "::set-output name=branch::${BRANCH}"
+
+ crowdin:
+ permissions:
+ contents: write # for git push
+
+ runs-on: ubuntu-latest
+ needs: setup
+ timeout-minutes: 5
+ steps:
+ - name: create pull request
+ run: gh pr create \
+ --base $BASE_BRANCH \
+ --head $RELEASE_BRANCH \
+ --title "Merge $RELEASE_BRANCH into $BASE_BRANCH" \
+ --body 'Created by GitHub action'
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ BASE_BRANCH: dev
+ RELEASE_BRANCH: ${{ needs.setup.outputs.latest_release_branch }}