ci: align pipeline on web/mydl pattern
Refactor the 4 trigger workflows to call a shared _ci-common.yaml
(hadolint + build-test), like web/mydl:
- pr.yaml -> PR checks via _ci-common (concurrency group, dispatch)
- main.yaml -> CI + cached load-build + git semver tag (PAT)
- tag.yaml -> CI + build/push :vX.Y.Z and :vX.Y.Z-latest
- cron.yaml -> nightly rebuild of :vX.Y.Z-latest
- _ci-common.yaml -> hadolint (step-level continue-on-error) + build-test
with GHA cache, load:true and tests/test.sh actually run
(real HTTP smoke tests - they existed but were never
invoked by any workflow)
Fixes: main.yaml tag job had a corrupted remote URL line; tests never ran
on any trigger path.
This commit is contained in:
1 parent
7eafe00c9a
commit
380695ecbe
5 files changed
+97
-85
No files matched your search
@@ -0,0 +1,34 @@
|
||||
name: CI Shared Jobs
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
hadolint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: hadolint/hadolint-action@06be81baf89a55ffd0e24b8f04a4185738dd3387 # v3.5.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
failure-threshold: warning
|
||||
|
||||
build-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
- name: Build (cached)
|
||||
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
push: false
|
||||
load: true
|
||||
tags: ci-image:${{ github.sha }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
- name: Test
|
||||
run: bash tests/test.sh ci-image:${{ github.sha }}
|
||||
Reference in new issue
Block a user