Initial release
Build and Push Docker Image / build (push) Successful in 17s

This commit is contained in:
Stardream
2026-06-16 19:26:32 +10:00
commit e3bf77296c
142 changed files with 5481 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to Gitea Container Registry
run: |
echo "${{ secrets.CR_TOKEN }}" | \
docker login 127.0.0.1:3333 -u ${{ github.actor }} --password-stdin
- name: Build and push
run: |
IMAGE=127.0.0.1:3333/stardream/bangumi-vault
PUBLIC=git.stdm.moe/stardream/bangumi-vault
REF="${{ github.ref }}"
if [[ "$REF" == refs/tags/* ]]; then
VERSION="${REF#refs/tags/}"
docker build -t "${IMAGE}:${VERSION}" -t "${IMAGE}:latest" .
docker push "${IMAGE}:${VERSION}"
docker push "${IMAGE}:latest"
else
docker build -t "${IMAGE}:latest" .
docker push "${IMAGE}:latest"
fi