diff --git a/.github/workflows/license-scan.yml b/.github/workflows/license-scan.yml index cbc50f7c0..945a524c1 100644 --- a/.github/workflows/license-scan.yml +++ b/.github/workflows/license-scan.yml @@ -50,6 +50,8 @@ jobs: git config --local user.name "github-actions[bot]" git config --local user.email "github-actions[bot]@users.noreply.github.com" git add ${DEPENDENCY_FILE} && git commit -m "[Release] Automated commit of ${DEPENDENCY_FILE} changes" && git push + git config --local --unset user.name + git config --local --unset user.email else echo "Unexpected changes:" git status --short diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8012c8f81..084aaaf85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,8 +103,9 @@ jobs: if [ "${REVISION}" != "0-SNAPSHOT" ]; then git config --local user.name "github-actions[bot]" git config --local user.email "github-actions[bot]@users.noreply.github.com" - git tag -a ${REVISION} -m "Release version ${REVISION}" - git push origin ${REVISION} + git tag -a ${REVISION} -m "Release version ${REVISION}" && git push origin ${REVISION} + git config --local --unset user.name + git config --local --unset user.email fi env: REVISION: ${{ github.event.inputs.revision }} diff --git a/.github/workflows/unset_git_config.yml b/.github/workflows/unset_git_config.yml new file mode 100644 index 000000000..92726d336 --- /dev/null +++ b/.github/workflows/unset_git_config.yml @@ -0,0 +1,34 @@ +name: Unset Git Config + +on: + # enable running the workflow manually + workflow_dispatch: + +jobs: + unset-git-config: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK & Maven Central credentials + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 21 + cache: 'maven' + + - name: Cache local Maven repository + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Check dependency licenses with dash tool + run: | + git config --local --unset user.name + git config --local --unset user.email + git config --global --unset user.name + git config --global --unset user.email