From 1846b140d0399a24b8149b1473ba723008b8a962 Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Tue, 25 Jun 2024 22:20:53 +0100 Subject: [PATCH] Update `rebar.lock` on `rebar.config` updates (by Renovate) (#31) --- .github/workflows/rebar-lock.yml | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/rebar-lock.yml diff --git a/.github/workflows/rebar-lock.yml b/.github/workflows/rebar-lock.yml new file mode 100644 index 0000000..3c0315f --- /dev/null +++ b/.github/workflows/rebar-lock.yml @@ -0,0 +1,40 @@ +--- +name: Update dependencies + +"on": + push: + branches: + - main + pull_request: + branches: + - "*" + workflow_dispatch: {} + +jobs: + update: + name: Update rebar.lock + + if: "${{ github.ref == 'refs/heads/renovate/rebar.config-deps' }}" + + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + + - uses: erlef/setup-beam@0a541161e47ec43ccbd9510053c5f336ca76c2a2 # v1.17.6 + with: + version-type: strict + version-file: .tool-versions + + - run: | + rebar3 upgrade --all + if ! git diff --exit-code >/dev/null; then + # there's stuff to push + git config user.name "GitHub Actions" + git config user.email "actions@user.noreply.github.com" + git add rebar.lock + git commit -m "[automation] update \`rebar.lock\` after Renovate" + git push + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}