Skip to content

Commit

Permalink
updated build with last travis success build plus current github buil…
Browse files Browse the repository at this point in the history
…d number
  • Loading branch information
kcs-bandihareesh committed Oct 17, 2024
1 parent add4fae commit 2862fc4
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/database-goodies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,17 @@ jobs:
mkdir -p $HOME/.m2
cp ./travis/actions-maven-settings.xml $HOME/.m2/settings.xml
- name: Calculate and Echo Build Number
id: calc-build-number
run: |
BASE_BUILD_NUMBER=9 # Set this to the last Traivs build number
NEW_BUILD_NUMBER=$((BASE_BUILD_NUMBER + ${{ github.run_number }}))
echo "NEW_BUILD_NUMBER=$NEW_BUILD_NUMBER" >> $GITHUB_ENV
echo "The new build number is: $NEW_BUILD_NUMBER"
- name: Update pom.xml version
run: |
sed -i "s/-SNAPSHOT/-github-build-${{ github.run_number }}/" pom.xml
sed -i "s/-SNAPSHOT/-build-${{ env.NEW_BUILD_NUMBER }}/" pom.xml
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
Expand Down Expand Up @@ -78,6 +86,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Calculate and Echo Build Number
id: calc-build-number
run: |
BASE_BUILD_NUMBER=9 # Set this to the last known build number
NEW_BUILD_NUMBER=$((BASE_BUILD_NUMBER + ${{ github.run_number }}))
echo "NEW_BUILD_NUMBER=$NEW_BUILD_NUMBER" >> $GITHUB_ENV
echo "The new build number is: $NEW_BUILD_NUMBER"
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
Expand Down Expand Up @@ -105,8 +121,8 @@ jobs:
- name: Update pom.xml version
run: |
sed -i "s/-SNAPSHOT/-github-build-${{ github.run_number }}/" pom.xml
sed -i "s/-SNAPSHOT/-build-${{ env.NEW_BUILD_NUMBER }}/" pom.xml
- name: Deploy snapshots
run: |
mvn --batch-mode -e -DskipTests=true deploy
mvn --batch-mode -e -DskipTests=true deploy

0 comments on commit 2862fc4

Please sign in to comment.