Skip to content

Commit

Permalink
🤹 ci (branch): Fix Prerelease Branch creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dianlight committed Mar 8, 2024
1 parent 0a632d9 commit c4a7420
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/docker-image-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ jobs:
--target ${{ steps.extract_project.outputs.name }} \
--docker-hub dianlight
- name: Get Master SHA
shell: bash
id: git_sha_master
run: |
echo "sha=$(git rev-parse origin/master)" >> $GITHUB_OUTPUT
- name: Create prerelease/${{ steps.extract_project.outputs.name }}_${{ steps.version_set.outputs.value_old }} if not exists
continue-on-error: true
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: 'refs/heads/prerelease/${{ steps.extract_project.outputs.name }}_${{ steps.version_set.outputs.value_old }}'
sha: '${{ steps.git_sha_master.outputs.sha }}'

- name: 🧑🏽‍💻 pull-request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -73,8 +88,6 @@ jobs:
run: |
git config --global user.email "[email protected]"
git config --global user.name "Prerelease Bot"
git branch -f "prerelease/${{ steps.extract_project.outputs.name }}_${{ steps.version_set.outputs.value_old }}"
git push -u origin "prerelease/${{ steps.extract_project.outputs.name }}_${{ steps.version_set.outputs.value_old }}" || :
git restore .
git clean -f
gh pr create --base "prerelease/${{ steps.extract_project.outputs.name }}_${{ steps.version_set.outputs.value_old }}" --title "Releasing ${{ github.ref }} into prerelease" --body ":crown: *An automated PR*"

0 comments on commit c4a7420

Please sign in to comment.