add docker build workflow and version file
This commit is contained in:
parent
bebeedc0ae
commit
a49bcca3f7
33
.gitea/workflows/build_docker.yml
Normal file
33
.gitea/workflows/build_docker.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Build Docker Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- senpai
|
||||||
|
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
|
||||||
|
tags: |
|
||||||
|
gitea.suda.codes/sudacode/mpv-youtube-queue-server:${{ env.current_version }}
|
||||||
|
gitea.suda.codes/sudacode/mpv-youtube-queue-server:latest
|
||||||
|
|
||||||
|
- name: Log out from Gitea Docker Registry
|
||||||
|
run: docker logout https://gitea.suda.codes
|
Loading…
Reference in New Issue
Block a user