CI: main runs the tests only; images are built for prod
The runner takes one job at a time, so a deployment (push to main, then to prod) built every image twice and the two runs took turns. Now main only tests, and prod tests, builds and deploys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
# main: tests and image build (tags: commit hash, `main`).
|
||||
# prod: the same, then deployment to the server (tags: commit hash, `prod`, `latest`).
|
||||
# main: tests only.
|
||||
# prod: tests, image build (tags: commit hash, `prod`, `latest`), then
|
||||
# deployment to the server.
|
||||
#
|
||||
# Runs on the self-hosted runner in ci/runner (label `linux`). Jobs use the
|
||||
# host's Docker daemon, so image builds share its BuildKit cache; a commit
|
||||
# already built on main is rebuilt from cache in seconds.
|
||||
# Runs on the self-hosted runner in ci/runner (label `linux`), one job at a
|
||||
# time; building on main too would build every deployed commit twice. Jobs use
|
||||
# the host's Docker daemon, so image builds share its BuildKit cache.
|
||||
#
|
||||
# Repository settings (Settings → Actions):
|
||||
# secrets.REGISTRY_TOKEN Gitea access token with package write access
|
||||
@@ -63,6 +64,7 @@ jobs:
|
||||
|
||||
build:
|
||||
needs: test
|
||||
if: github.ref == 'refs/heads/prod'
|
||||
runs-on: linux
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
Reference in New Issue
Block a user