damccorm commented on code in PR #26793:
URL: https://github.com/apache/beam/pull/26793#discussion_r1205974426
##########
.github/workflows/cut_release_branch.yml:
##########
@@ -43,13 +43,58 @@ on:
JENKINS_TOKEN:
description: API Token for the current Jenkins user. Can be generated
at https://ci-beam.apache.org/user/<user>/configure
required: true
+ CREATE_RELEASE_BRANCH:
+ description: Whether to cut the release branch. You shouldnt skip this
unless it has already been completed successfully (yes/no)
+ required: true
+ default: 'yes'
permissions:
contents: write
pull-requests: write
jobs:
+ update_release_branch:
+ runs-on: ubuntu-latest
+ env:
+ RELEASE: ${{ github.event.inputs.RELEASE_VERSION }}
+ steps:
+ - name: Validate Release Version
+ run: |
+ if [[ ${RELEASE} =~ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then
+ echo "RELEASE_VERSION=${BASH_REMATCH[1]}" >> $GITHUB_ENV
+ echo "RELEASE_BRANCH=release-${RELEASE}" >> $GITHUB_ENV
+ else
+ echo "The input for RELEASE does not match a valid format
[0-9]+\.[0-9]+\.[0-9]+"
+ exit 1
+ fi
+ - name: Check out code
+ uses: actions/checkout@v3
+ - name: Set git config
+ run: |
+ git config user.name $GITHUB_ACTOR
+ git config user.email actions@"$RUNNER_NAME".local
+ - name: Checkout to release branch
+ run: |
+ git checkout -b ${RELEASE_BRANCH}
+ echo "==================Current working
branch======================="
+ echo ${RELEASE_BRANCH}
+ echo
"==============================================================="
+ - name: Update release version for dataflow runner
+ run: |
+ sed -i -e "s/'beam-master-.*'/'${RELEASE}'/g" \
+ runners/google-cloud-dataflow-java/build.gradle
+ echo "===============Update release branch as
following=============="
+ git diff
+ echo
"==============================================================="
+ - name: Commit and Push to release branch
+ run: |
+ git add runners/google-cloud-dataflow-java/build.gradle
+ git commit -m "Set Dataflow container to release version."
+ git push --set-upstream origin ${RELEASE_BRANCH}
+ if: ${{github.event.inputs.CREATE_RELEASE_BRANCH == 'yes'}}
Review Comment:
Yes. I could actually put it on more steps, but I can't put it at the job
level because the other jobs depend on this one (so if this one doesn't run,
those won't either)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]