.github/workflows/auto_release.yml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch | |
jobs: | |
auto_release: | |
name: convert nightly to release | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: pr_all_to_release | |
env: | |
GH_TOKEN: ${{ secrets.RevoluNixPKGS_TOKEN }} | |
run: | | |
QUERY_RESULT=$( | |
curl -L \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.RevoluNixPKGS_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
"https://api.github.com/search/repositories?q=pkg+user:RevoluNix" | |
) | |
echo $QUERY_RESULT | jq -r '.items[].full_name' | while read REPOSITORY; do | |
gh pr create \ | |
-R ${REPOSITORY} \ | |
--head nightly \ | |
--base main \ | |
--title "Switch nightly chanel to main" \ | |
--body "" | |
sleep 2 | |
gh pr merge nightly \ | |
-R ${REPOSITORY} \ | |
-s \ | |
--auto | |
sleep 15 | |
done |