update ci
Some checks failed
Build and Push Base Image / build-and-push (push) Failing after 2m21s

This commit is contained in:
sangge-redmi 2025-01-16 10:17:42 +08:00
parent 53ec2773ac
commit 6e07893e0d
2 changed files with 11 additions and 40 deletions

View File

@ -4,9 +4,9 @@ on:
push: push:
paths: paths:
- "basedockerfile" - "basedockerfile"
- ".gitea/workflows/build_image.yaml" - ".gitea/workflows/build-image.yaml"
# schedule: schedule:
# - cron: "0 0 1 * *" # 每月1号00:00执行 - cron: "0 0 1 * *" # 每月1号00:00执行
env: env:
REGISTRY: git.mamahaha.work REGISTRY: git.mamahaha.work
@ -15,9 +15,14 @@ env:
jobs: jobs:
build-and-push: build-and-push:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: https://git.mamahaha.work/actions/checkout@v4 uses: https://git.mamahaha.work/actions/checkout@v4
with:
submodules: "recursive"
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: https://git.mamahaha.work/actions/setup-buildx-action@v3 uses: https://git.mamahaha.work/actions/setup-buildx-action@v3

View File

@ -1,15 +1,9 @@
name: Test CI name: Test CI
on: on:
push push:
# push: paths:
# paths: - "src/**"
# - "src/**"
#
env:
REGISTRY: git.mamahaha.work
IMAGE_NAME: tpre
jobs: jobs:
test: test:
@ -27,31 +21,3 @@ jobs:
# run: | # run: |
# ls $PWD/src # ls $PWD/src
# docker run --rm -v .:/app git.mamahaha.work/sangge/tpre:base ls # docker run --rm -v .:/app git.mamahaha.work/sangge/tpre:base ls
build-and-push:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: https://git.mamahaha.work/actions/checkout@v4
- name: Set up Docker Buildx
uses: https://git.mamahaha.work/actions/setup-buildx-action@v3
- name: Login to Private Registry
uses: https://git.mamahaha.work/actions/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Build and push
uses: https://git.mamahaha.work/actions/build-push-action@v5
with:
context: .
file: basedockerfile
push: true
tags: |
${{ env.REGISTRY }}/sangge/${{ env.IMAGE_NAME }}:base