mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
Also push image to ghcr.io/gameyfin/app
Use caching in Docker build Improve error handling
This commit is contained in:
@@ -8,6 +8,8 @@ on:
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@@ -23,15 +25,6 @@ jobs:
|
||||
GAMEYFIN_KEYSTORE_PASSWORD: ${{ secrets.GAMEYFIN_KEYSTORE_PASSWORD }}
|
||||
run: ./gradlew clean build -Pvaadin.productionMode=true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Extract tag from branch name
|
||||
id: extract_tag
|
||||
run: |
|
||||
@@ -40,11 +33,13 @@ jobs:
|
||||
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
uses: ./.github/actions/docker-build-push
|
||||
with:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
ghcr_username: ${{ github.actor }}
|
||||
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
context: .
|
||||
file: docker/Dockerfile
|
||||
dockerfile: docker/Dockerfile
|
||||
platforms: linux/arm64/v8,linux/amd64
|
||||
push: true
|
||||
tags: grimsi/gameyfin:${{ steps.extract_tag.outputs.tag }}
|
||||
|
||||
tags: grimsi/gameyfin:${{ steps.extract_tag.outputs.tag }},ghcr.io/gameyfin/app:${{ steps.extract_tag.outputs.tag }}
|
||||
|
||||
Reference in New Issue
Block a user