Skip to content

.github/workflows/auto_release.yml #2

.github/workflows/auto_release.yml

.github/workflows/auto_release.yml #2

Workflow file for this run

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