From 667843a4c701e613f372bf45e08e88050f54bb1b Mon Sep 17 00:00:00 2001 From: Mateusz Front Date: Tue, 23 Apr 2024 10:27:01 +0200 Subject: [PATCH] fix update packages list action --- .github/workflows/update-packages-list.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-packages-list.yml b/.github/workflows/update-packages-list.yml index 37ceb52a6..c110e2926 100644 --- a/.github/workflows/update-packages-list.yml +++ b/.github/workflows/update-packages-list.yml @@ -18,11 +18,20 @@ jobs: env: GH_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - elixir scripts/elixir/update_packages_list.exs + echo "Run script" + elixir scripts/elixir/update_packages_list.exs > output.txt; RESULT=$? + echo "Set status" + STATUS=$(if [ $RESULT = 0 ]; then echo "[Passed]"; else; echo "[Failed]"; fi) + echo "Status: ${STATUS}" + echo "Configure git" git config user.name 'Membrane Bot' git config user.email 'bot@membrane.stream' + echo "Checkout" git checkout -B auto-update-packages-list + echo "Commit" git add README.md git commit -m "auto update packages list in readme" --allow-empty + echo "Push" git push -f -u origin auto-update-packages-list - gh pr create -B master -H auto-update-packages-list --title 'Auto update packages list' --body '' \ No newline at end of file + echo "Create PR" + gh pr create -B master -H auto-update-packages-list --title "${STATUS} Auto update packages list" --body "Script output:\n$(cat output.txt)" \ No newline at end of file