diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c3e47dab..366bf76d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,9 +26,11 @@ on: codeflare-repository-organization: type: string default: "project-codeflare" - -env: - PR_BRANCH_NAME: snyk-tag-monitoring-${{ github.run_id }} + release-branch: + type: string + description: 'Branch to release from (default: main)' + required: false + default: 'main' jobs: release: @@ -42,6 +44,7 @@ jobs: - name: Checkout the repository uses: actions/checkout@v4 with: + ref: ${{ github.event.inputs.release-branch }} token: ${{ secrets.GH_CLI_TOKEN }} - name: Install Python uses: actions/setup-python@v5 @@ -59,7 +62,7 @@ jobs: run: | gh workflow run publish-documentation.yaml \ --repo ${{ github.event.inputs.codeflare-repository-organization }}/codeflare-sdk \ - --ref ${{ github.ref }} \ + --ref ${{ github.event.inputs.release-branch }} \ --field codeflare_sdk_release_version=${{ github.event.inputs.release-version }} env: GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} @@ -81,7 +84,7 @@ jobs: run: | gh workflow run odh-notebooks-sync.yml \ --repo ${{ github.event.inputs.codeflare-repository-organization }}/codeflare-sdk \ - --ref ${{ github.ref }} \ + --ref ${{ github.event.inputs.release-branch }} \ --field upstream-repository-organization=opendatahub-io \ --field codeflare-repository-organization=${{ github.event.inputs.codeflare-repository-organization }} \ --field codeflare_sdk_release_version=${{ github.event.inputs.release-version }} diff --git a/.github/workflows/update-versions.yaml b/.github/workflows/update-versions.yaml index 1eb253fb..7ac70d59 100644 --- a/.github/workflows/update-versions.yaml +++ b/.github/workflows/update-versions.yaml @@ -33,6 +33,11 @@ on: required: false type: string default: '' + target-branch: + type: string + description: 'Target branch to update and create PR against (default: main)' + required: false + default: 'main' env: PR_BRANCH_NAME: ray-version-update-${{ github.run_id }} @@ -60,8 +65,8 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git checkout main - git pull origin main + git checkout ${{ github.event.inputs.target-branch }} + git pull origin ${{ github.event.inputs.target-branch }} git checkout -b ${{ env.PR_BRANCH_NAME }} - name: Update constants.py @@ -323,7 +328,7 @@ jobs: gh pr create \ --title "$PR_TITLE" \ --body "$PR_BODY" \ - --base main \ + --base ${{ github.event.inputs.target-branch }} \ --head ${{ env.PR_BRANCH_NAME }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}