diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ec585cbc5..ccd797e4b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -255,10 +255,11 @@ jobs: formula: rtx bump-alpine: runs-on: ubuntu-22.04 - if: startsWith(github.event.ref, 'refs/tags/v') container: ghcr.io/jdx/rtx:alpine timeout-minutes: 30 needs: [release] + env: + DRY_RUN: ${{ startsWith(github.event.ref, 'refs/tags/v') && '0' || '1' }} steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/scripts/release-alpine.sh b/scripts/release-alpine.sh index b814069bf0..c14b00e4f3 100755 --- a/scripts/release-alpine.sh +++ b/scripts/release-alpine.sh @@ -27,10 +27,19 @@ abuild -r apkbuild-lint APKBUILD git add APKBUILD -git checkout -B "rtx/${RTX_VERSION#v}" +git checkout -B rtx git commit -m "community/rtx: upgrade to ${RTX_VERSION#v}" git remote add jdxcode "https://jdxcode:$GITLAB_TOKEN@gitlab.alpinelinux.org/jdxcode/aports.git" -git push -f jdxcode -#glab mr create --draft --fill --yes -H jdxcode/aports -R alpine/aports + +if [ "$DRY_RUN" == 0 ]; then + git push -f jdxcode +fi + +open_mr="$(gitlab mr list -R alpine/aports --author=@me)" +if [[ "$open_mr" != "Showing"* ]]; then + if [ "$DRY_RUN" == 0 ]; then + glab mr create --draft --fill --yes -H jdxcode/aports -R alpine/aports + fi +fi #git show