Upgrade all dependencies #134
This file contains 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: Upgrade all dependencies | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 14 * * *" | |
jobs: | |
upgrade_dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the project | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GIT_REPOSITORY_ACCESS_TOKEN }} | |
- name: Cache Clojure Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
- ~/.m2 | |
- ~/.gitlibs | |
key: cache-${{ hashFiles('**/deps.edn') }} | |
restore-keys: clojure-deps- | |
- name: Prepare java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '22' | |
- name: Install clojure tools | |
uses: DeLaGuardo/[email protected] | |
with: | |
cli: 1.12.0.1488 | |
cljfmt: 0.13.0 | |
- name: Install antq | |
run: clojure -Ttools install-latest :lib com.github.liquidz/antq :as antq | |
- name: Upgrade outdated deps.edn dependencies | |
run: | | |
yes | clojure "-J-Dclojure.main.report=stderr" -Tantq outdated :upgrade true | |
cljfmt fix | |
- name: Upgrade Dockerfile dependencies | |
run: clojure "-J-Dclojure.main.report=stderr" -X:upgrade upgrade | |
- name: Commit upgrades | |
id: commit_upgrades | |
run: | | |
git config --global user.name "GitHub Action - Upgrade dependencies" | |
git config --global user.email "[email protected]" | |
git diff --quiet || git commit -am "Upgrade outdated dependencies" && git push |