Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bischoffz committed Jun 20, 2024
1 parent 804a7ca commit e38946e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,51 +59,51 @@ jobs:
generateReleaseNotes: true
skipIfReleaseExists: true

update-gcm-taskit:
if: ${{ !contains(github.event.head_commit.message, 'update-util-to-') }}
update-gcm:
if: ${{ !endsWith(needs.release.outputs.taskit_version, '0') }}
needs: release
runs-on: ubuntu-latest
permissions:
contents: write
env:
VERSION: ${{ needs.release.outputs.taskit_version }}
steps:
- name: Checkout GCM Taskit
- name: Checkout GCM
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-gcm-taskit
repository: HHS/ASPR-8
token: ${{ secrets.GHA_BOT }}

- name: Update Taskit version
- name: Update Util version
run : |
echo "$VERSION"
sed -i "0,/<taskit.version>.*<\/taskit.version>/s//<taskit.version>$VERSION<\/taskit.version>/g" pom.xml
sed -i "0,/<util.version>.*<\/util.version>/s//<util.version>$VERSION<\/util.version>/g" pom.xml
- name: Increment GCM Taskit Version
- name: Increment GCM Version
run: |
current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)
echo GCM Taskit Version: $current_version
echo GCM Version: $current_version
parts=( ${current_version//./ } )
bv=$((parts[2] + 1))
new_version="${parts[0]}.${parts[1]}.${bv}"
echo New GCM Taskit Version: $new_version
echo New GCM Version: $new_version
sed -i "0,/<revision>.*<\/revision>/s//<revision>$new_version<\/revision>/g" pom.xml
- name: Setup Git
run: |
git config --global user.name "github-actions"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Make branch in GCM Taskit
- name: Make branch in GCM
run: |
git checkout -b update-taskit-to-$VERSION
git checkout -b update-util-to-$VERSION
git add pom.xml
git commit -m "Update taskit to $VERSION"
git push --set-upstream origin update-taskit-to-$VERSION
git commit -m "Update util to $VERSION"
git push --set-upstream origin update-util-to-$VERSION
- name: Make PR in GCM Taskit
- name: Make PR in GCM
run: |
gh pr create -R HHS/ASPR-ms-gcm-taskit -B main --fill
gh pr create -R HHS/ASPR-8 -B main --fill
gh pr merge -m --auto
env:
GH_TOKEN: ${{ secrets.GHA_BOT }}

0 comments on commit e38946e

Please sign in to comment.