Skip to content

Commit

Permalink
Fix automatic dependency update (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide authored Jan 22, 2025
1 parent 37a07c8 commit 71d2369
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 60 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/check-deps.sh

This file was deleted.

36 changes: 30 additions & 6 deletions .github/workflows/check_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
otp_version: ['27.1']
otp_version: ['27.1.3']

steps:
- uses: actions/checkout@v4
Expand All @@ -38,8 +38,32 @@ jobs:
- name: Build
run: make build

- name: Check dependencies
run: .github/workflows/check-deps.sh
env:
BRANCH_NAME: update-deps-${{ github.run_id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update dependencies
id: update-deps
run: |
_update_output="$(TERM=dumb rebar3 update-deps --replace)"
cat <<EOF > /tmp/pr-body.md
Output of running \`rebar3 update-deps\`:
\```
$_update_output
\```
EOF
rebar3 fmt --write
# We can always run this step because the action will exit silently if there are no changes.
# See: https://github.com/marketplace/actions/create-pull-request#action-behaviour
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
# By always using the same branch name, we can keep pushing to
# the same branch if there are new changes.
branch: "automatic-dependencies-update"
commit-message: "Update dependencies"
title: "Update dependencies"
body-path: /tmp/pr-body.md
labels: "dependencies,task"
team-reviewers: "dnsimple/platform"
delete-branch: true

0 comments on commit 71d2369

Please sign in to comment.