runner-images/.gitea/workflows/push.yaml
张泊明518370910136 e544dedd6e
All checks were successful
push / build (push) Successful in 51s
feat: build golang-ubuntu-latest image
2024-10-10 23:59:10 -04:00

30 lines
960 B
YAML

---
name: push
on:
push:
branches:
- golang-ubuntu-latest
jobs:
build:
container:
image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest
steps:
- name: Check out repository code
uses: https://gitea.com/BoYanZh/checkout@focs
- name: Determine build command
id: build_command
run: |
if echo "${{ github.event.head_commit.message }}" | grep -q "force build"; then
echo "build_command=make force-build" >> $GITHUB_ENV
else
echo "build_command=make build" >> $GITHUB_ENV
fi
- name: Build
run: ${{ env.build_command }}
- name: Check images
run: docker images
- name: Remove dangling images
run: docker image prune -f
- name: Push
run: make push