chore: workflow fix
This commit is contained in:
@@ -11,24 +11,36 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
release-pr:
|
release-pr:
|
||||||
name: Create Release PR
|
name: Create Release PR
|
||||||
if: "!contains(gitea.event.head_commit.message, 'chore(main): release') && !contains(gitea.event.head_commit.message, 'chore: update manifest')"
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Skip if release/manifest commit
|
||||||
|
run: |
|
||||||
|
COMMIT_MSG="${{ gitea.event.head_commit.message }}"
|
||||||
|
if echo "$COMMIT_MSG" | grep -qE 'chore\(main\): release|chore: update manifest'; then
|
||||||
|
echo "Skipping release/manifest commit"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "SHOULD_RUN=true" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
if: env.SHOULD_RUN == 'true'
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GT_TOKEN }}
|
token: ${{ secrets.GT_TOKEN }}
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
|
if: env.SHOULD_RUN == 'true'
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
if: env.SHOULD_RUN == 'true'
|
||||||
run: |
|
run: |
|
||||||
pip install gitpython packaging
|
pip install gitpython packaging
|
||||||
|
|
||||||
- name: Create Release PR
|
- name: Create Release PR
|
||||||
|
if: env.SHOULD_RUN == 'true'
|
||||||
env:
|
env:
|
||||||
GIT_TOKEN: ${{ secrets.GT_TOKEN }}
|
GIT_TOKEN: ${{ secrets.GT_TOKEN }}
|
||||||
REPO: "TDPI/jellyfin-plugin-smartnotify"
|
REPO: "TDPI/jellyfin-plugin-smartnotify"
|
||||||
|
|||||||
Reference in New Issue
Block a user