Skip to content

fix(deps): update all java dependencies #2676

fix(deps): update all java dependencies

fix(deps): update all java dependencies #2676

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
repository_dispatch:
types:
- UpdateREADME
jobs:
build:
name: Build and Update README
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- name: 📥 Checkout Repository
uses: actions/checkout@v6
- name: ☕ Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: "17"
distribution: "temurin"
- name: 📦 Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: wrapper
- name: 📝 Update README with Teswiz Commit ID
run: |
set -eo pipefail
echo "Payload received: ${{ toJson(github.event.client_payload) }}"
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
echo "Running on branch: '$BRANCH_NAME'"
if [[ "$BRANCH_NAME" == "main" ]]; then
git pull --rebase origin main
COMMIT_ID=$(curl -s -H "Authorization: token $PAT_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/anandbagmar/teswiz/actions/workflows/Build_And_Run_Unit_Tests_CI.yml/runs?status=success" \
| jq -r '[.workflow_runs[] | select(.head_branch == "main") | .head_commit.id][0][0:10]')
echo "Latest successful Teswiz commit: $COMMIT_ID"
awk -v id="$COMMIT_ID" '{gsub("commit-.*-blue", "commit-"id"-blue")}1' README.md > README_new.md
mv README_new.md README.md
if [ -n "$(git status --porcelain)" ]; then
git add README.md
git commit -m "Update README with Teswiz's latest successful commit ID - $COMMIT_ID"
git push origin main
else
echo "✅ No changes to push."
fi
else
echo "ℹ️ Skipping update: not on main branch."
fi
env:
PAT_TOKEN: ${{ secrets.TESWIZ_PAT }}
- name: 🛠️ Run Gradle Build
env:
TESWIZ_APPLITOOLS_API_KEY: ${{ secrets.TESWIZ_APPLITOOLS_API_KEY }}
run: ./gradlew build --refresh-dependencies
- name: 🧾 Build Summary (on failure)
if: failure()
run: |
echo "### ❌ Build failed" >> "$GITHUB_STEP_SUMMARY"
echo "**Commit:** ${{ github.sha }}" >> "$GITHUB_STEP_SUMMARY"
echo "**Triggered by:** ${{ github.actor }}" >> "$GITHUB_STEP_SUMMARY"
echo "**Workflow:** [View Run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> "$GITHUB_STEP_SUMMARY"