Skip to content

Commit 48022a5

Browse files
authored
chore(ci): fix new mc version workflow (#88)
1 parent 9967de4 commit 48022a5

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

.github/workflows/new-mc-version.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v4
17+
with:
18+
token: ${{ secrets.MC_VERSION_WORKFLOW_TOKEN }}
1719

1820
- name: Set up Python
1921
uses: actions/setup-python@v5
@@ -38,23 +40,16 @@ jobs:
3840
echo "changes=false" >> $GITHUB_OUTPUT
3941
fi
4042
41-
- name: Create new branch, commit and push
42-
if: steps.git-check.outputs.changes == 'true'
43-
id: push-branch
44-
run: |
45-
BRANCH_NAME="version-${LATEST_VERSION}"
46-
git checkout -b "$BRANCH_NAME"
47-
git add .
48-
git commit -m "feat: ${LATEST_VERSION}"
49-
git push origin "$BRANCH_NAME"
50-
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT
51-
5243
- name: Create Pull Request
5344
if: steps.git-check.outputs.changes == 'true' && env.LATEST_VERSION != ''
54-
uses: peter-evans/create-pull-request@v6
45+
uses: peter-evans/create-pull-request@v7
5546
with:
56-
token: ${{ secrets.GITHUB_TOKEN }}
57-
branch: ${{ steps.push-branch.outputs.branch }}
58-
base: main
59-
title: "feat: ${LATEST_VERSION}"
60-
body: "This PR updates files for Minecraft version ${LATEST_VERSION}."
47+
author: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
48+
assignees: [ okafke ]
49+
reviewers: [ okafke ]
50+
commit-message: "feat: ${{ env.LATEST_VERSION }}"
51+
delete-branch: true
52+
token: ${{ secrets.MC_VERSION_WORKFLOW_TOKEN }}
53+
branch: version-${{ env.LATEST_VERSION }}
54+
title: "feat: ${{ env.LATEST_VERSION }}"
55+
body: "This PR updates files for Minecraft version ${{ env.LATEST_VERSION }}."

0 commit comments

Comments
 (0)