From 1454e8be789eca4b23957663b5db3cf9a8b0507a Mon Sep 17 00:00:00 2001 From: Russ Poetker Date: Tue, 14 May 2024 08:24:49 -0400 Subject: [PATCH] Add allow empty commit --- .github/actions/yarn-version/action.yml | 2 +- .github/workflows/pass-complete-release.yml | 102 ++++++++++---------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/.github/actions/yarn-version/action.yml b/.github/actions/yarn-version/action.yml index 9736255..7d5e2b0 100644 --- a/.github/actions/yarn-version/action.yml +++ b/.github/actions/yarn-version/action.yml @@ -23,7 +23,7 @@ runs: yarn install --frozen-lockfile yarn config set version-git-tag false yarn version --new-version $RELEASE - git commit -am "Update version to $RELEASE" + git commit --allow-empty -am "Update version to $RELEASE" if [ "$SKIP_TAG" == "false" ]; then echo "Tagging yarn version $RELEASE" git tag $RELEASE diff --git a/.github/workflows/pass-complete-release.yml b/.github/workflows/pass-complete-release.yml index 92357ba..4b7f342 100644 --- a/.github/workflows/pass-complete-release.yml +++ b/.github/workflows/pass-complete-release.yml @@ -91,10 +91,10 @@ jobs: - name: Set Release/commit/tag ~ Java Repositories if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }} run: | - (cd main && mvn versions:set -B -ntp -DnewVersion=$RELEASE && git commit -am "Update version to $RELEASE" && git tag --force $RELEASE) + (cd main && mvn versions:set -B -ntp -DnewVersion=$RELEASE && git commit --allow-empty -am "Update version to $RELEASE" && git tag --force $RELEASE) (cd combined && mvn versions:set -B -ntp -DnewVersion=$RELEASE) - (cd combined/pass-core && git commit -am "Update version to $RELEASE" && git tag --force $RELEASE) - (cd combined/pass-support && git commit -am "Update version to $RELEASE" && git tag --force $RELEASE) + (cd combined/pass-core && git commit --allow-empty -am "Update version to $RELEASE" && git tag --force $RELEASE) + (cd combined/pass-support && git commit --allow-empty -am "Update version to $RELEASE" && git tag --force $RELEASE) - name: Release Java modules if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }} @@ -187,7 +187,7 @@ jobs: run: | cd combined/pass-docker sed -i "/^PASS_VERSION/s/.*/PASS_VERSION=$RELEASE/" .env - git commit -am "Update version to $RELEASE" + git commit --allow-empty -am "Update version to $RELEASE" git tag $RELEASE - name: Build Release pass-docker images @@ -211,36 +211,36 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.JAVA_RELEASE_PAT }} -# - name: Set Snapshot/commit ~ Java Repositories -# run: | -# (cd main && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT && git commit -am "Update version to $NEXT") -# (cd combined && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT) -# (cd combined/pass-core && git commit -am "Update version to $NEXT") -# (cd combined/pass-support && git commit -am "Update version to $NEXT") -# -# - name: Release Snapshot Java modules -# working-directory: combined -# run: | -# mvn -B -V -ntp -P release clean deploy -DskipTests -DskipITs -# env: -# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} -# MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} -# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} -# -# - name: Push Snapshot Docker images to GHCR ~ Java Repositories -# run: | -# docker push ghcr.io/eclipse-pass/pass-core-main:$NEXT -# docker push ghcr.io/eclipse-pass/deposit-services-core:$NEXT -# docker push ghcr.io/eclipse-pass/pass-notification-service:$NEXT -# docker push ghcr.io/eclipse-pass/jhu-grant-loader:$NEXT -# docker push ghcr.io/eclipse-pass/pass-journal-loader:$NEXT -# docker push ghcr.io/eclipse-pass/pass-nihms-loader:$NEXT -# -# - name: Push the Snapshot commits ~ Java Repositories -# run: | -# (cd main && git push origin) -# (cd combined/pass-core && git push origin) -# (cd combined/pass-support && git push origin) + - name: Set Snapshot/commit ~ Java Repositories + run: | + (cd main && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT && git commit --allow-empty -am "Update version to $NEXT") + (cd combined && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT) + (cd combined/pass-core && git commit --allow-empty -am "Update version to $NEXT") + (cd combined/pass-support && git commit --allow-empty -am "Update version to $NEXT") + + - name: Release Snapshot Java modules + working-directory: combined + run: | + mvn -B -V -ntp -P release clean deploy -DskipTests -DskipITs + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + + - name: Push Snapshot Docker images to GHCR ~ Java Repositories + run: | + docker push ghcr.io/eclipse-pass/pass-core-main:$NEXT + docker push ghcr.io/eclipse-pass/deposit-services-core:$NEXT + docker push ghcr.io/eclipse-pass/pass-notification-service:$NEXT + docker push ghcr.io/eclipse-pass/jhu-grant-loader:$NEXT + docker push ghcr.io/eclipse-pass/pass-journal-loader:$NEXT + docker push ghcr.io/eclipse-pass/pass-nihms-loader:$NEXT + + - name: Push the Snapshot commits ~ Java Repositories + run: | + (cd main && git push origin) + (cd combined/pass-core && git push origin) + (cd combined/pass-support && git push origin) - name: Set Snapshot/commit ~ pass-ui uses: ./main/.github/actions/yarn-version @@ -274,20 +274,20 @@ jobs: - name: Push the Snapshot commits ~ pass-acceptance-testing run: cd combined/pass-acceptance-testing && git push origin -# - name: Set Snapshot/commit ~ pass-docker -# run: | -# cd combined/pass-docker -# sed -i "/^PASS_VERSION/s/.*/PASS_VERSION=$NEXT/" .env -# git commit -am "Update version to $NEXT" -# -# - name: Build Snapshot pass-docker images -# working-directory: combined/pass-docker -# run: docker compose -f docker-compose.yml -f eclipse-pass.local.yml build idp ldap -# -# - name: Push Snapshot Docker images to GHCR ~ pass-docker -# run: | -# docker push ghcr.io/eclipse-pass/demo-ldap:$NEXT -# docker push ghcr.io/eclipse-pass/idp:$NEXT -# -# - name: Push the Snapshot commits ~ pass-docker -# run: cd combined/pass-docker && git push origin + - name: Set Snapshot/commit ~ pass-docker + run: | + cd combined/pass-docker + sed -i "/^PASS_VERSION/s/.*/PASS_VERSION=$NEXT/" .env + git commit --allow-empty -am "Update version to $NEXT" + + - name: Build Snapshot pass-docker images + working-directory: combined/pass-docker + run: docker compose -f docker-compose.yml -f eclipse-pass.local.yml build idp ldap + + - name: Push Snapshot Docker images to GHCR ~ pass-docker + run: | + docker push ghcr.io/eclipse-pass/demo-ldap:$NEXT + docker push ghcr.io/eclipse-pass/idp:$NEXT + + - name: Push the Snapshot commits ~ pass-docker + run: cd combined/pass-docker && git push origin