Aligned GA (#2059)

This commit is contained in:
Joe Milazzo 2023-06-10 15:12:35 -05:00 committed by GitHub
parent 17f9748d88
commit baf7c9eb92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,457 +1,457 @@
name: .NET Build Test and Sonar Scan name: .NET Build Test and Sonar Scan
on: on:
push: push:
branches: '**' branches: '**'
pull_request: pull_request:
branches: [ main, develop ] branches: [ main, develop, canary ]
types: [synchronize] types: [synchronize]
jobs: jobs:
check_pr: check_pr:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check PR Body - name: Check PR Body
uses: JJ/github-pr-contains-action@releases/v10 uses: JJ/github-pr-contains-action@releases/v10
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
bodyDoesNotContain: "[\"|`]" bodyDoesNotContain: "[\"|`]"
build: build:
name: Build .Net name: Build .Net
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup .NET Core - name: Setup .NET Core
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 7.0.x dotnet-version: 7.0.x
- name: Install Swashbuckle CLI - name: Install Swashbuckle CLI
shell: powershell shell: powershell
run: dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli run: dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli
- name: Install dependencies - name: Install dependencies
run: dotnet restore run: dotnet restore
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.11 java-version: 1.11
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: csproj name: csproj
path: Kavita.Common/Kavita.Common.csproj path: Kavita.Common/Kavita.Common.csproj
- name: Cache SonarCloud packages - name: Cache SonarCloud packages
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~\sonar\cache path: ~\sonar\cache
key: ${{ runner.os }}-sonar key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner - name: Cache SonarCloud scanner
id: cache-sonar-scanner id: cache-sonar-scanner
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: .\.sonar\scanner path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner restore-keys: ${{ runner.os }}-sonar-scanner
- name: Install SonarCloud scanner - name: Install SonarCloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: powershell shell: powershell
run: | run: |
New-Item -Path .\.sonar\scanner -ItemType Directory New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
- name: Sonar Scan - name: Sonar Scan
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell shell: powershell
run: | run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"Kareadita_Kavita" /o:"kareadita" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" .\.sonar\scanner\dotnet-sonarscanner begin /k:"Kareadita_Kavita" /o:"kareadita" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet build --configuration Release dotnet build --configuration Release
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
- name: Test - name: Test
run: dotnet test --no-restore --verbosity normal run: dotnet test --no-restore --verbosity normal
version: version:
name: Bump version on Develop push name: Bump version on Develop/Canary push
needs: [ build ] needs: [ build ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }} if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/canary') }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup .NET Core - name: Setup .NET Core
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 7.0.x dotnet-version: 7.0.x
- name: Install Swashbuckle CLI - name: Install Swashbuckle CLI
run: dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli run: dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli
- name: Install dependencies - name: Install dependencies
run: dotnet restore run: dotnet restore
- name: Build - name: Build
run: dotnet build --configuration Release --no-restore run: dotnet build --configuration Release --no-restore
- name: Bump versions - name: Bump versions
uses: SiqiLu/dotnet-bump-version@2.0.0 uses: SiqiLu/dotnet-bump-version@2.0.0
with: with:
version_files: Kavita.Common/Kavita.Common.csproj version_files: Kavita.Common/Kavita.Common.csproj
github_token: ${{ secrets.REPO_GHA_PAT }} github_token: ${{ secrets.REPO_GHA_PAT }}
version_mask: "0.0.0.1" version_mask: "0.0.0.1"
develop: develop:
name: Build Nightly Docker if Develop push name: Build Nightly Docker if Develop 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' }}
steps: steps:
- name: Find Current Pull Request - name: Find Current Pull Request
uses: jwalton/gh-find-current-pr@v1.0.2 uses: jwalton/gh-find-current-pr@v1.0.2
id: findPr id: findPr
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Parse PR body - name: Parse PR body
id: parse-body id: parse-body
run: | run: |
body="${{ steps.findPr.outputs.body }}" body="${{ steps.findPr.outputs.body }}"
if [[ ${#body} -gt 1870 ]] ; then if [[ ${#body} -gt 1870 ]] ; then
body=${body:0:1870} body=${body:0:1870}
body="${body}...and much more. 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/${{ steps.findPr.outputs.pr }}"
fi fi
body=${body//\'/} body=${body//\'/}
body=${body//'%'/'%25'} body=${body//'%'/'%25'}
body=${body//$'\n'/'%0A'} body=${body//$'\n'/'%0A'}
body=${body//$'\r'/'%0D'} body=${body//$'\r'/'%0D'}
body=${body//$'`'/'%60'} body=${body//$'`'/'%60'}
body=${body//$'>'/'%3E'} body=${body//$'>'/'%3E'}
echo $body echo $body
echo "::set-output name=BODY::$body" echo "::set-output name=BODY::$body"
- name: Check Out Repo - name: Check Out Repo
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: develop ref: develop
- name: NodeJS to Compile WebUI - name: NodeJS to Compile WebUI
uses: actions/setup-node@v2.1.5 uses: actions/setup-node@v2.1.5
with: with:
node-version: '16' node-version: '16'
- run: | - run: |
cd UI/Web || exit cd UI/Web || exit
echo 'Installing web dependencies' echo 'Installing web dependencies'
npm install --legacy-peer-deps npm install --legacy-peer-deps
echo 'Building UI' echo 'Building UI'
npm run prod npm run prod
echo 'Copying back to Kavita wwwroot' echo 'Copying back to Kavita wwwroot'
rsync -a dist/ ../../API/wwwroot/ rsync -a dist/ ../../API/wwwroot/
cd ../ || exit cd ../ || exit
- name: Get csproj Version - name: Get csproj Version
uses: naminodarie/get-net-sdk-project-versions-action@v1 uses: naminodarie/get-net-sdk-project-versions-action@v1
id: get-version id: get-version
with: with:
proj-path: Kavita.Common/Kavita.Common.csproj proj-path: Kavita.Common/Kavita.Common.csproj
- name: Parse Version - name: Parse Version
run: | run: |
version='${{steps.get-version.outputs.assembly-version}}' version='${{steps.get-version.outputs.assembly-version}}'
echo "::set-output name=VERSION::$version" echo "::set-output name=VERSION::$version"
id: parse-version id: parse-version
- name: Echo csproj version - name: Echo csproj version
run: echo "${{steps.get-version.outputs.assembly-version}}" run: echo "${{steps.get-version.outputs.assembly-version}}"
- name: Compile dotnet app - name: Compile dotnet app
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 7.0.x dotnet-version: 7.0.x
- name: Install Swashbuckle CLI - name: Install Swashbuckle CLI
run: dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli run: dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli
- run: ./monorepo-build.sh - run: ./monorepo-build.sh
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKER_HUB_USERNAME }} username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- name: Build and push - name: Build and push
id: docker_build id: docker_build
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true push: true
tags: kizaing/kavita:nightly, kizaing/kavita:nightly-${{ steps.parse-version.outputs.VERSION }}, ghcr.io/kareadita/kavita:nightly, ghcr.io/kareadita/kavita:nightly-${{ steps.parse-version.outputs.VERSION }} tags: kizaing/kavita:nightly, kizaing/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 }}
- name: Notify Discord - name: Notify Discord
uses: rjstone/discord-webhook-notify@v1 uses: rjstone/discord-webhook-notify@v1
with: with:
severity: info severity: info
description: v${{steps.get-version.outputs.assembly-version}} - ${{ steps.findPr.outputs.title }} description: v${{steps.get-version.outputs.assembly-version}} - ${{ steps.findPr.outputs.title }}
details: '${{ steps.parse-body.outputs.BODY }}' details: '${{ steps.parse-body.outputs.BODY }}'
text: <@&939225459156217917> <@&939225350775406643> A new nightly build has been released for docker. text: <@&939225459156217917> <@&939225350775406643> A new nightly build has been released for docker.
webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }} webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }}
stable: stable:
name: Build Stable Docker if Main push name: Build Stable Docker if Main push
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 == 'push' && github.ref == 'refs/heads/main' }} if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps: steps:
- name: Find Current Pull Request - name: Find Current Pull Request
uses: jwalton/gh-find-current-pr@v1.0.2 uses: jwalton/gh-find-current-pr@v1.0.2
id: findPr id: findPr
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Parse PR body - name: Parse PR body
id: parse-body id: parse-body
run: | run: |
body="${{ steps.findPr.outputs.body }}" body="${{ steps.findPr.outputs.body }}"
if [[ ${#body} -gt 1870 ]] ; then if [[ ${#body} -gt 1870 ]] ; then
body=${body:0:1870} body=${body:0:1870}
body="${body}...and much more. body="${body}...and much more.
Read full changelog: https://github.com/Kareadita/Kavita/releases/latest" Read full changelog: https://github.com/Kareadita/Kavita/releases/latest"
fi fi
body=${body//\'/} body=${body//\'/}
body=${body//'%'/'%25'} body=${body//'%'/'%25'}
body=${body//$'\n'/'%0A'} body=${body//$'\n'/'%0A'}
body=${body//$'\r'/'%0D'} body=${body//$'\r'/'%0D'}
body=${body//$'`'/'%60'} body=${body//$'`'/'%60'}
body=${body//$'>'/'%3E'} body=${body//$'>'/'%3E'}
echo $body echo $body
echo "::set-output name=BODY::$body" echo "::set-output name=BODY::$body"
- name: Check Out Repo - name: Check Out Repo
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: main ref: main
- name: NodeJS to Compile WebUI - name: NodeJS to Compile WebUI
uses: actions/setup-node@v2.1.5 uses: actions/setup-node@v2.1.5
with: with:
node-version: '16' node-version: '16'
- run: | - run: |
cd UI/Web || exit cd UI/Web || exit
echo 'Installing web dependencies' echo 'Installing web dependencies'
npm ci npm ci
echo 'Building UI' echo 'Building UI'
npm run prod npm run prod
echo 'Copying back to Kavita wwwroot' echo 'Copying back to Kavita wwwroot'
rsync -a dist/ ../../API/wwwroot/ rsync -a dist/ ../../API/wwwroot/
cd ../ || exit cd ../ || exit
- name: Get csproj Version - name: Get csproj Version
uses: naminodarie/get-net-sdk-project-versions-action@v1 uses: naminodarie/get-net-sdk-project-versions-action@v1
id: get-version id: get-version
with: with:
proj-path: Kavita.Common/Kavita.Common.csproj proj-path: Kavita.Common/Kavita.Common.csproj
- name: Echo csproj version - name: Echo csproj version
run: echo "${{steps.get-version.outputs.assembly-version}}" run: echo "${{steps.get-version.outputs.assembly-version}}"
- name: Parse Version - name: Parse Version
run: | run: |
version='${{steps.get-version.outputs.assembly-version}}' version='${{steps.get-version.outputs.assembly-version}}'
newVersion=${version%.*} newVersion=${version%.*}
echo $newVersion echo $newVersion
echo "::set-output name=VERSION::$newVersion" echo "::set-output name=VERSION::$newVersion"
id: parse-version id: parse-version
- name: Compile dotnet app - name: Compile dotnet app
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 7.0.x dotnet-version: 7.0.x
- name: Install Swashbuckle CLI - name: Install Swashbuckle CLI
run: dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli run: dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli
- run: ./monorepo-build.sh - run: ./monorepo-build.sh
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKER_HUB_USERNAME }} username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- name: Build and push - name: Build and push
id: docker_build id: docker_build
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true push: true
tags: kizaing/kavita:latest, kizaing/kavita:${{ steps.parse-version.outputs.VERSION }}, ghcr.io/kareadita/kavita:latest, ghcr.io/kareadita/kavita:${{ steps.parse-version.outputs.VERSION }} tags: kizaing/kavita:latest, kizaing/kavita:${{ steps.parse-version.outputs.VERSION }}, ghcr.io/kareadita/kavita:latest, ghcr.io/kareadita/kavita:${{ 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 }}
- name: Notify Discord - name: Notify Discord
uses: rjstone/discord-webhook-notify@v1 uses: rjstone/discord-webhook-notify@v1
with: with:
severity: info severity: info
description: v${{steps.get-version.outputs.assembly-version}} - ${{ steps.findPr.outputs.title }} description: v${{steps.get-version.outputs.assembly-version}} - ${{ steps.findPr.outputs.title }}
details: '${{ steps.parse-body.outputs.BODY }}' details: '${{ steps.parse-body.outputs.BODY }}'
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 }}
canary: canary:
name: Build Nightly Docker if Canary push name: Build Nightly Docker if Canary 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/canary' }} if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/canary' }}
steps: steps:
- name: Find Current Pull Request - name: Find Current Pull Request
uses: jwalton/gh-find-current-pr@v1.0.2 uses: jwalton/gh-find-current-pr@v1.0.2
id: findPr id: findPr
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check Out Repo - name: Check Out Repo
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: develop ref: develop
- name: NodeJS to Compile WebUI - name: NodeJS to Compile WebUI
uses: actions/setup-node@v2.1.5 uses: actions/setup-node@v2.1.5
with: with:
node-version: '16' node-version: '16'
- run: | - run: |
cd UI/Web || exit cd UI/Web || exit
echo 'Installing web dependencies' echo 'Installing web dependencies'
npm install --legacy-peer-deps npm install --legacy-peer-deps
echo 'Building UI' echo 'Building UI'
npm run prod npm run prod
echo 'Copying back to Kavita wwwroot' echo 'Copying back to Kavita wwwroot'
rsync -a dist/ ../../API/wwwroot/ rsync -a dist/ ../../API/wwwroot/
cd ../ || exit cd ../ || exit
- name: Get csproj Version - name: Get csproj Version
uses: naminodarie/get-net-sdk-project-versions-action@v1 uses: naminodarie/get-net-sdk-project-versions-action@v1
id: get-version id: get-version
with: with:
proj-path: Kavita.Common/Kavita.Common.csproj proj-path: Kavita.Common/Kavita.Common.csproj
- name: Parse Version - name: Parse Version
run: | run: |
version='${{steps.get-version.outputs.assembly-version}}' version='${{steps.get-version.outputs.assembly-version}}'
echo "::set-output name=VERSION::$version" echo "::set-output name=VERSION::$version"
id: parse-version id: parse-version
- name: Echo csproj version - name: Echo csproj version
run: echo "${{steps.get-version.outputs.assembly-version}}" run: echo "${{steps.get-version.outputs.assembly-version}}"
- name: Compile dotnet app - name: Compile dotnet app
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 7.0.x dotnet-version: 7.0.x
- name: Install Swashbuckle CLI - name: Install Swashbuckle CLI
run: dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli run: dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli
- run: ./monorepo-build.sh - run: ./monorepo-build.sh
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKER_HUB_USERNAME }} username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- name: Build and push - name: Build and push
id: docker_build id: docker_build
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true push: true
tags: kizaing/kavita:canary, kizaing/kavita:canary-${{ steps.parse-version.outputs.VERSION }}, ghcr.io/kareadita/kavita:canary, ghcr.io/kareadita/kavita:canary-${{ steps.parse-version.outputs.VERSION }} tags: kizaing/kavita:canary, kizaing/kavita:canary-${{ steps.parse-version.outputs.VERSION }}, ghcr.io/kareadita/kavita:canary, ghcr.io/kareadita/kavita:canary-${{ 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 }}