Release 1.4.2 (#191)

* Updated Java version to 21
* Updated Node.js version used in build to 20
* Add Docker ARM64 image
This commit is contained in:
Simon
2023-10-24 15:30:05 +02:00
committed by GitHub
parent 97b0320ac5
commit 4caa2a4187
9 changed files with 111 additions and 18 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '18'
java-version: '21'
distribution: 'temurin'
- name: Cache SonarCloud packages
+92
View File
@@ -0,0 +1,92 @@
name: Gameyfin Docker Build & Push
on:
workflow_dispatch:
inputs:
branch:
description: "The branch to checkout when cutting the release."
required: true
default: "main"
tag:
description: "Docker image tag."
required: true
default: "X.Y.Z"
jobs:
release:
runs-on: ubuntu-latest
name: Release
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Configure Git User
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
- name: Maven Package
run: mvn package -B -s .maven_settings.xml -DreleaseVersion=${{ github.event.inputs.tag }} -Darguments="-Dmaven.deploy.skip=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true"
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
grimsi/gameyfin
tags: |
type=semver,pattern={{version}},value=${{ github.event.inputs.tag }}
type=semver,pattern={{major}}.{{minor}},value=${{ github.event.inputs.tag }}
type=semver,pattern={{major}},value=${{ github.event.inputs.tag }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- # Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
name: Move Docker cache (temp fix)
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
+1
View File
@@ -98,6 +98,7 @@ jobs:
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}