From c384a4b8f175e40456a57ef5b894a0ded5471111 Mon Sep 17 00:00:00 2001 From: Karan Batavia Date: Wed, 19 Jun 2024 15:19:46 +0530 Subject: [PATCH] add automation to create a release PR --- .github/workflows/release_pr_automation.yml | 19 +++++++++++++++++++ .github/workflows/upstream_sync.yml | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release_pr_automation.yml diff --git a/.github/workflows/release_pr_automation.yml b/.github/workflows/release_pr_automation.yml new file mode 100644 index 000000000000..4b978d6fa4a8 --- /dev/null +++ b/.github/workflows/release_pr_automation.yml @@ -0,0 +1,19 @@ +name: sync to master +on: + push: + branches: [backup_sync] + workflow_dispatch: # allow to manually trigger this workflow +jobs: + create_pr: + permissions: write-all + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: backup_sync + + - name: Create a PR from backup_sync to master + run: gh pr create --repo Privado-Inc/joern -B master -H backup_sync --title 'Release PR' --body 'Created by Github action' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/upstream_sync.yml b/.github/workflows/upstream_sync.yml index 2275249f9f56..1c0616a8e404 100644 --- a/.github/workflows/upstream_sync.yml +++ b/.github/workflows/upstream_sync.yml @@ -17,7 +17,7 @@ jobs: run: | echo "LATEST_TAG=$(curl -L \ -H "Accept: application/vnd.github+json" \ - https://api.github.com/repos/joernio/joern/releases/latest | jq -r .name | sed 's/[v.]//g' )" >> $GITHUB_ENV + https://api.github.com/repos/joernio/joern/releases/latest | jq -r .name | sed 's/[v]//g' | sed 's/[.]/-/g' )" >> $GITHUB_ENV - name: Create tag branch and merge upstream uses: peterjgrainger/action-create-branch@v2.2.0