Changed the develop workflow to not run on stable releases.

This commit is contained in:
Joe Milazzo
2026-03-03 14:19:04 -06:00
parent f0e3309b3d
commit a1b0ecf7c9
2 changed files with 40 additions and 24 deletions
+39 -23
View File
@@ -2,32 +2,50 @@ name: Nightly Workflow
on:
push:
branches: [ 'develop', '!release/**' ]
branches: [ 'develop' ]
workflow_dispatch:
jobs:
check-source:
runs-on: ubuntu-24.04
outputs:
head_ref: ${{ steps.findPr.outputs.head_ref }}
pr_title: ${{ steps.findPr.outputs.title }}
pr_body: ${{ steps.findPr.outputs.body }}
pr_number: ${{ steps.findPr.outputs.pr }}
steps:
- name: Find Current Pull Request
uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: all
github-token: ${{ secrets.GITHUB_TOKEN }}
debug:
needs: [ check-source ]
runs-on: ubuntu-24.04
steps:
- name: Debug Info
run: |
echo "Event Name: ${{ github.event_name }}"
echo "Ref: ${{ github.ref }}"
echo "Not Contains Release: ${{ !contains(github.head_ref, 'release') }}"
echo "Matches Develop: ${{ github.ref == 'refs/heads/develop' }}"
echo "Source Branch (head_ref): ${{ needs.check-source.outputs.head_ref }}"
echo "Is Release: ${{ startsWith(needs.check-source.outputs.head_ref, 'release/') }}"
version:
name: Bump version
needs: [ check-source ]
runs-on: ubuntu-24.04
if: github.ref == 'refs/heads/develop'
if: github.ref == 'refs/heads/develop' && !startsWith(needs.check-source.outputs.head_ref, 'release/')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
dotnet-version: 10.0.x
- name: Cache NuGet packages
uses: actions/cache@v4
@@ -46,29 +64,25 @@ jobs:
develop:
name: Build Nightly Docker
needs: [ version ]
needs: [ check-source, version ]
runs-on: ubuntu-24.04
if: github.ref == 'refs/heads/develop'
if: github.ref == 'refs/heads/develop' && !startsWith(needs.check-source.outputs.head_ref, 'release/')
permissions:
packages: write
contents: read
steps:
- name: Find Current Pull Request
uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: all
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Parse PR body
id: parse-body
env:
RAW_BODY: ${{ needs.check-source.outputs.pr_body }}
PR_NUMBER: ${{ needs.check-source.outputs.pr_number }}
run: |
body="${{ steps.findPr.outputs.body }}"
body="$RAW_BODY"
if [[ ${#body} -gt 1870 ]] ; then
body=${body:0:1870}
body="${body}...and much more.
Read full changelog: https://github.com/Kareadita/Kavita/pull/${{ steps.findPr.outputs.pr }}"
Read full changelog: https://github.com/Kareadita/Kavita/pull/$PR_NUMBER"
fi
body=${body//\'/}
@@ -77,13 +91,14 @@ jobs:
body=${body//$'\r'/'%0D'}
body=${body//$'`'/'%60'}
body=${body//$'>'/'%3E'}
echo $body
echo "BODY=$body" >> $GITHUB_OUTPUT
- name: Check Out Repo
uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 1
- name: NodeJS to Compile WebUI
uses: actions/setup-node@v4
@@ -91,6 +106,7 @@ jobs:
node-version: 22
cache: 'npm'
cache-dependency-path: UI/Web/package-lock.json
- run: |
cd UI/Web || exit
echo 'Installing web dependencies'
@@ -188,8 +204,8 @@ jobs:
uses: rjstone/discord-webhook-notify@v1
if: ${{ github.repository_owner == 'Kareadita' }}
with:
severity: info
description: v${{steps.get-version.outputs.assembly-version}} - ${{ steps.findPr.outputs.title }}
details: '${{ steps.findPr.outputs.body }}'
text: <@&939225459156217917> <@&939225350775406643> A new nightly build has been released for docker.
webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }}
severity: info
description: v${{steps.get-version.outputs.assembly-version}} - ${{ needs.check-source.outputs.pr_title }}
details: '${{ steps.parse-body.outputs.BODY }}'
text: <@&939225459156217917> <@&939225350775406643> A new nightly build has been released for docker.
webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }}