Skip to content

Commit

Permalink
CI: make alpine releases reuse open draft MRs
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 7, 2023
1 parent 37f6dc2 commit f1422b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 12 additions & 3 deletions scripts/release-alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f1422b6

Please sign in to comment.