-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix push error for presto stable release workflow (#24426)
* Fix push error for presto stable release workflow * Add actor and branch checking for presto stalbe release action
- Loading branch information
Showing
1 changed file
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,18 @@ jobs: | |
packages: write | ||
|
||
steps: | ||
- name: Checkout Presto source | ||
- name: Check actor | ||
if: ${{ github.actor != 'prestodb-ci' }} | ||
run: echo "Unauthorized actor. Please login with prestodb-ci to run this action." && exit 1 | ||
|
||
- name: Check branch | ||
if: ${{ github.ref != 'refs/heads/master' }} | ||
run: echo "Invalid branch. This action can only be run on the master branch." && exit 1 | ||
|
||
- name: Checkout presto source | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.PRESTODB_CI_TOKEN }} | ||
ref: master | ||
show-progress: false | ||
|
||
|
@@ -25,15 +34,14 @@ jobs: | |
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- name: Configure Git | ||
- name: Configure git | ||
run: | | ||
git config --global --add safe.directory ${{github.workspace}} | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "oss-release-bot" | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
git config pull.rebase false | ||
- name: Set Maven version | ||
- name: Set maven version | ||
run: | | ||
unset MAVEN_CONFIG && ./mvnw versions:set -DremoveSnapshot -ntp | ||
|
@@ -42,6 +50,7 @@ jobs: | |
run: | | ||
PRESTO_RELEASE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate \ | ||
-Dexpression=project.version -q -ntp -DforceStdout | tail -n 1) | ||
echo "PRESTO_RELEASE_VERSION=$PRESTO_RELEASE_VERSION" | ||
echo "PRESTO_RELEASE_VERSION=$PRESTO_RELEASE_VERSION" >> $GITHUB_OUTPUT | ||
- name: Update version in master | ||
|