Skip to content

Update packages list #12

Update packages list

Update packages list #12

name: Update packages list
on:
schedule:
- cron: '0 0 1 1-12/1 *' # Run every month
workflow_dispatch: {}
jobs:
test:
runs-on: ubuntu-latest
name: Update packages list in README
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: '26.1'
elixir-version: '1.15.6'
- name: Update packages list
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
OUTPUT=$(elixir scripts/elixir/update_packages_list.exs 2>1); RESULT=$?
STATUS=$(if [ $RESULT = 0 ]; then echo "[Passed]"; else; echo "[Failed]"; fi)
git config user.name 'Membrane Bot'
git config user.email 'bot@membrane.stream'
git checkout -B auto-update-packages-list
git add README.md
git commit -m "auto update packages list in readme" --allow-empty
git push -f -u origin auto-update-packages-list
gh pr create -B master -H auto-update-packages-list --title "${STATUS} Auto update packages list" --body "Script output:\n${RESULT}"