diff --git a/.github/workflows/check-deps.sh b/.github/workflows/check-deps.sh deleted file mode 100755 index 0439af3..0000000 --- a/.github/workflows/check-deps.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -e - -GITHUB_PR_LABEL="dependencies" -COMMIT_TITLE="Update dependencies" - -if [ -z "$BRANCH_NAME" ]; then - echo "Branch name is required" - exit 1 -fi - -function check_pr { - gh pr list --state open --label "$GITHUB_PR_LABEL" -} - -git config user.name "${GITHUB_ACTOR}" -git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - -_update_output="$(TERM=dumb rebar3 update-deps --replace)" - -if git diff --exit-code --quiet; then - echo "No changes to the dependencies" - exit 0 -else - echo "Detected changes to dependencies, reformatting as well" - rebar3 fmt --write -fi - -git checkout -b "$BRANCH_NAME" -git add . - -git commit -F- < /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 \ No newline at end of file diff --git a/rebar.lock b/rebar.lock index 5700aaf..0a4be88 100644 --- a/rebar.lock +++ b/rebar.lock @@ -8,6 +8,7 @@ {<<"folsom">>,{pkg,<<"folsom">>,<<"1.0.0">>},0}, {<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1}, {<<"iso8601">>,{pkg,<<"iso8601">>,<<"1.3.4">>},1}, + {<<"jsx">>,{pkg,<<"jsx">>,<<"2.10.0">>},1}, {<<"lager">>,{pkg,<<"lager">>,<<"3.9.2">>},0}, {<<"ranch">>,{pkg,<<"ranch">>,<<"1.8.0">>},1}, {<<"recon">>,{pkg,<<"recon">>,<<"2.5.5">>},1}]}. @@ -22,6 +23,7 @@ {<<"folsom">>, <<"50ECC998D2149939F1D5E0AA3E32788F8ED16A58E390D81B5C0BE4CC4EF25589">>}, {<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>}, {<<"iso8601">>, <<"7B1F095F86F6CF65E1E5A77872E8E8BF69BD58D4C3A415B3F77D9CC9423ECBB9">>}, + {<<"jsx">>, <<"77760560D6AC2B8C51FD4C980E9E19B784016AA70BE354CE746472C33BEB0B1C">>}, {<<"lager">>, <<"4CAB289120EB24964E3886BD22323CB5FEFE4510C076992A23AD18CF85413D8C">>}, {<<"ranch">>, <<"8C7A100A139FD57F17327B6413E4167AC559FBC04CA7448E9BE9057311597A1D">>}, {<<"recon">>, <<"C108A4C406FA301A529151A3BB53158CADC4064EC0C5F99B03DDB8C0E4281BDF">>}]}, @@ -35,6 +37,7 @@ {<<"folsom">>, <<"DD6AB97278E94F9E4CFC43E188224A7B8C7EAEC0DD2E935007005177F3EEBB0E">>}, {<<"goldrush">>, <<"99CB4128CFFCB3227581E5D4D803D5413FA643F4EB96523F77D9E6937D994CEB">>}, {<<"iso8601">>, <<"A334469C07F1C219326BC891A95F5EEC8EB12DD8071A3FFF56A7843CB20FAE34">>}, + {<<"jsx">>, <<"9A83E3704807298016968DB506F9FAD0F027DE37546EB838B3AE1064C3A0AD62">>}, {<<"lager">>, <<"7F904D9E87A8CB7E66156ED31768D1C8E26EBA1D54F4BC85B1AA4AC1F6340C28">>}, {<<"ranch">>, <<"49FBCFD3682FAB1F5D109351B61257676DA1A2FDBE295904176D5E521A2DDFE5">>}, {<<"recon">>, <<"632A6F447DF7CCC1A4A10BDCFCE71514412B16660FE59DECA0FCF0AA3C054404">>}]}