build(deps): bump org.springframework.boot:spring-boot-starter-parent from 3.4.5 to 4.0.6 in /assets/spring-sleuth #29
Workflow file for this run
This file contains hidden or 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
| name: Build spring-sleuth jar | |
| on: | |
| push: | |
| branches: ["develop"] | |
| paths: | |
| - "assets/spring-sleuth/src/**" | |
| - "assets/spring-sleuth/pom.xml" | |
| - ".github/workflows/build-spring-sleuth-jar.yml" | |
| pull_request: | |
| branches: ["develop"] | |
| paths: | |
| - "assets/spring-sleuth/src/**" | |
| - "assets/spring-sleuth/pom.xml" | |
| - ".github/workflows/build-spring-sleuth-jar.yml" | |
| jobs: | |
| build: | |
| if: github.actor != 'github-actions[bot]' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GIT_BOT_TOKEN || github.token }} | |
| ref: ${{ github.head_ref || github.ref_name }} | |
| fetch-depth: 0 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| cache: maven | |
| - name: Build jar with Maven | |
| working-directory: assets/spring-sleuth | |
| run: mvn package | |
| - name: Commit rebuilt jar to PR branch | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && env.GIT_BOT_TOKEN != '' && env.GIT_BOT_NAME != '' && env.GIT_BOT_EMAIL != '' | |
| env: | |
| GIT_BOT_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} | |
| GIT_BOT_NAME: ${{ secrets.GIT_BOT_NAME }} | |
| GIT_BOT_EMAIL: ${{ secrets.GIT_BOT_EMAIL }} | |
| run: | | |
| git config user.name "${GIT_BOT_NAME}" | |
| git config user.email "${GIT_BOT_EMAIL}" | |
| git remote set-url origin "https://x-access-token:${GIT_BOT_TOKEN}@github.com/${{ github.repository }}.git" | |
| git add assets/spring-sleuth/target/spring-sleuth-0.0.1.jar | |
| if git diff --cached --quiet; then | |
| echo "No jar changes to commit" | |
| exit 0 | |
| fi | |
| git commit -m "Build spring-sleuth-0.0.1.jar with 'mvn package'" | |
| # The PR branch may advance while this workflow runs; rebase and retry push. | |
| for attempt in 1 2 3; do | |
| git pull --rebase origin "${{ github.head_ref }}" | |
| if git push origin "HEAD:${{ github.head_ref }}"; then | |
| exit 0 | |
| fi | |
| echo "Push attempt ${attempt} failed; retrying..." | |
| sleep 2 | |
| done | |
| echo "Failed to push rebuilt jar after retries" | |
| exit 1 | |