From fb5619a08a577801d31236a96b595fd55af352ed Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Sat, 23 Nov 2024 01:05:20 -0600 Subject: [PATCH] Add dependency_diff action --- .github/workflows/dependency_diff.yml | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/dependency_diff.yml diff --git a/.github/workflows/dependency_diff.yml b/.github/workflows/dependency_diff.yml new file mode 100644 index 000000000..e32f33658 --- /dev/null +++ b/.github/workflows/dependency_diff.yml @@ -0,0 +1,46 @@ +name: Update Dependency Diff + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - main + paths: + - 'gradle/libs.versions.toml' + pull_request: + paths: + - 'gradle/libs.versions.toml' + workflow_dispatch: + +jobs: + update-deps: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + + - name: Update dependency diffs + run: ./update_dependency_diff + + - name: Commit changes + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add deps_*.txt + git diff --staged --quiet || git commit -m "Update dependency diffs" + git push