52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
name: Test CI
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "src/**"
|
|
|
|
jobs:
|
|
test:
|
|
name: test speed
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: https://git.mamahaha.work/actions/checkout@v3
|
|
|
|
# - name: Run script in Docker container
|
|
# run: |
|
|
# ls $PWD/src
|
|
# 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: 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
|