Skip to content

Update rebar.lock #1291

Update rebar.lock

Update rebar.lock #1291

Workflow file for this run

---
name: Update rebar.lock
"on":
push:
branches:
- main
pull_request:
branches:
- "*"
workflow_dispatch: {}
merge_group:
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
permissions:
contents: read
jobs:
branch:
outputs:
head_ref: ${{steps.branch.outputs.head_ref}}
runs-on: ubuntu-24.04
steps:
- id: branch
run: |
head_ref=${GITHUB_HEAD_REF}
echo "head_ref is ${head_ref}"
echo "head_ref=${head_ref}" > "${GITHUB_OUTPUT}"
update:
name: Update rebar.lock
needs: [branch]
if: endsWith(needs.branch.outputs.head_ref, 'rebar.config-deps')
runs-on: ubuntu-24.04
steps:
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
id: app-token
with:
app-id: ${{vars.ARIZONA_BOT_APP_ID}}
private-key: ${{secrets.ARIZONA_BOT_PRIVATE_KEY}}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
token: ${{steps.app-token.outputs.token}}
ref: ${{needs.branch.outputs.head_ref}}
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
id: setup-beam
with:
version-type: strict
version-file: .tool-versions
- name: Restore _build
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: _build
key: "_build-cache-for\
-os-${{runner.os}}\
-otp-${{steps.setup-beam.outputs.otp-version}}\
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
-hash-${{hashFiles('rebar.lock')}}-${{hashFiles('rebar.config')}}"
- name: Restore rebar3's cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.cache/rebar3
key: "rebar3-cache-for\
-os-${{runner.os}}\
-otp-${{steps.setup-beam.outputs.otp-version}}\
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
-hash-${{hashFiles('rebar.lock')}}-${{hashFiles('rebar.config')}}"
- run: |
rebar3 upgrade --all
if ! git diff --exit-code >/dev/null; then
# there's stuff to push
git config user.name "arizona[bot]"
git config user.email "[email protected]"
git add rebar.lock
git commit -m "[automation] update \`rebar.lock\` after Renovate"
git push
fi
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}