add base image ci
This commit is contained in:
parent
e70cfdd857
commit
34432e77c7
39
.gitea/workflows/build_image.yaml
Normal file
39
.gitea/workflows/build_image.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: Build and Push Base Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "basedockerfile"
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 1 * *" # 每月1号00:00执行
|
||||||
|
workflow_dispatch: # 允许手动触发
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: git.mamahaha.work
|
||||||
|
IMAGE_NAME: tpre
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: https://git.mamahaha.work/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Private Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
password: ${{ secrets.PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: basedockerfile
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ env.REGISTRY }}/sangge/${{ env.IMAGE_NAME }}:base
|
Loading…
x
Reference in New Issue
Block a user