runner-images/.gitea/workflows/push.yaml
张泊明518370910136 37a1ef5a80
Some checks failed
push / build (push) Failing after 5s
ci: use runs-on
2025-03-18 16:10:56 -04:00

29 lines
894 B
YAML

---
name: push
on:
push:
branches:
- golang-ubuntu-latest
jobs:
build:
runs-on: 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