This commit is contained in:
Robbie Davis 2023-09-04 14:18:41 -04:00 committed by GitHub
parent 08ad8a66cf
commit 6b86e95317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ jobs:
name: Bump version on Develop/Canary PR (and not coming from release/) name: Bump version on Develop/Canary PR (and not coming from release/)
needs: [ build ] needs: [ build ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'push' && (github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'refs/heads/canary') && !startsWith(github.event.pull_request.head.ref, 'release/') if: github.event_name == 'push' && (github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'refs/heads/canary') && !contains('release/', github.event.pull_request.head.ref)
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@ -106,13 +106,13 @@ jobs:
develop: develop:
name: Build Nightly Docker if Develop push name: Build Nightly Docker if non-release push
needs: [ build, version ] needs: [ build, version ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
packages: write packages: write
contents: read contents: read
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }} if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' && !contains('release/', github.event.pull_request.head.ref}}
steps: steps:
- name: Find Current Pull Request - name: Find Current Pull Request
uses: jwalton/gh-find-current-pr@v1 uses: jwalton/gh-find-current-pr@v1
@ -230,13 +230,13 @@ jobs:
webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }} webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }}
stable: stable:
name: Build Stable Docker if Main push name: Build Stable and Nightly Docker if Release
needs: [ build ] needs: [ build ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
packages: write packages: write
contents: read contents: read
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/') && github.event.pull_request.base.ref == 'develop' if: github.event_name == 'pull_request' && contains('release/', github.event.pull_request.head.ref && github.event.pull_request.base.ref == 'develop'
steps: steps:
- name: Find Current Pull Request - name: Find Current Pull Request
@ -336,7 +336,7 @@ jobs:
id: buildx id: buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
- name: Build and push - name: Build and push stable
id: docker_build id: docker_build
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
@ -345,6 +345,15 @@ jobs:
push: true push: true
tags: jvmilazz0/kavita:latest, jvmilazz0/kavita:${{ steps.parse-version.outputs.VERSION }}, ghcr.io/kareadita/kavita:latest, ghcr.io/kareadita/kavita:${{ steps.parse-version.outputs.VERSION }} tags: jvmilazz0/kavita:latest, jvmilazz0/kavita:${{ steps.parse-version.outputs.VERSION }}, ghcr.io/kareadita/kavita:latest, ghcr.io/kareadita/kavita:${{ steps.parse-version.outputs.VERSION }}
- name: Build and push nightly
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: jvmilazz0/kavita:nightly, jvmilazz0/kavita:nightly-${{ steps.parse-version.outputs.VERSION }}, ghcr.io/kareadita/kavita:nightly, ghcr.io/kareadita/kavita:nightly-${{ steps.parse-version.outputs.VERSION }}
- name: Image digest - name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }} run: echo ${{ steps.docker_build.outputs.digest }}
@ -357,6 +366,15 @@ jobs:
text: <@&939225192553644133> A new stable build has been released. text: <@&939225192553644133> A new stable build has been released.
webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }} webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }}
- name: Notify Discord
uses: rjstone/discord-webhook-notify@v1
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 }}
canary: canary:
name: Build Canary Docker if Canary push name: Build Canary Docker if Canary push
needs: [ build, version ] needs: [ build, version ]