Skip to content

Commit

Permalink
Merge pull request #2077 from yue9944882/cherrypick-14-release-job-pr
Browse files Browse the repository at this point in the history
Cherrypick(release-14): Release job send pr instead of direct push
  • Loading branch information
k8s-ci-robot authored Jan 10, 2022
2 parents 894b3fb + b41720e commit e1ebf13
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
exec:exec | perl -ne 'die unless m/${{ github.event.inputs.releaseVersion }}-SNAPSHOT/'
- name: Release Prepare
run: |
git checkout -b 'automated-release-${{ github.event.inputs.releaseVersion }}'
mvn --batch-mode \
release:prepare \
-Dtag=v${{ github.event.inputs.releaseVersion }} \
Expand All @@ -74,8 +75,16 @@ jobs:
run: |
# The tests are already executed in the prepare, skipping
mvn -DlocalCheckout=true -Darguments=-DskipTests release:perform
git push https://${{ github.token }}@github.com/${{ github.repository }}.git ${{ github.ref_name }}:${{ github.ref_name }}
git push https://${{ github.token }}@github.com/${{ github.repository }}.git \
automated-release-${{ github.event.inputs.releaseVersion }}:automated-release-${{ github.event.inputs.releaseVersion }}
git push https://${{ github.token }}@github.com/${{ github.repository }}.git v${{ github.event.inputs.releaseVersion }}
- name: Pull Request
uses: repo-sync/pull-request@v2
with:
source_branch: automated-release-${{ github.event.inputs.releaseVersion }}
destination_branch: ${{ github.ref_name }}
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_title: "Automated Release: ${{ github.event.inputs.releaseVersion }}"
- name: Publish Release
if: ${{ github.event.inputs.dry-run != 'true' }}
uses: ncipollo/release-action@v1
Expand Down

0 comments on commit e1ebf13

Please sign in to comment.