sudacode 9544b0415c
All checks were successful
Build Docker Image / build (push) Successful in 12m37s
update to multiplatform and add cache
2025-02-09 23:25:30 -08:00

38 lines
1.2 KiB
YAML

name: Build Docker Image
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Read current version
id: get_version
run: echo "current_version=$(cat VERSION)" >> $GITHUB_ENV
- name: Log in to Gitea Docker Registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login https://gitea.suda.codes -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
gitea.suda.codes/sudacode/mpv-youtube-queue-server:${{ env.current_version }}
gitea.suda.codes/sudacode/mpv-youtube-queue-server:latest
cache-from: type=registry,ref=gitea.suda.codes/sudacode/mpv-youtube-queue-server:latest
cache-to: type=inline
- name: Log out from Gitea Docker Registry
run: docker logout https://gitea.suda.codes