Standardize workflows to htpasswd pattern
PR Checks / hadolint (pull_request) Failing after 3s
PR Checks / build-test (pull_request) Failing after 2s

Transform all 4 workflow files to match the standard pattern used by
perso/htpasswd (and offlineimap):

main.yaml:
  - Rename to 'Main Release'
  - hadolint (continue-on-error, dockerfile param) → test (build ci-image, run tests)
  → build (no push, just build target image) → tag (fetch-depth 0, git auth with
    SA_TOKEN_ACTION_PUSH_TAGS, semver tagging)

cron.yaml:
  - Keep original schedule '0 0 * * *'
  - hadolint → test → build-push (get-latest-tag, metadata with -latest
    only, no :latest tag)

tag.yaml:
  - hadolint → test → build-push (type=ref,event=tag + suffix=-latest)

pr.yaml:
  - hadolint (no continue-on-error, add dockerfile param) → build-test
  - Scope to pull_request branches: [master]
  - Use ci-image pattern with buildx setup
This commit is contained in:
Sagent
2026-06-13 21:25:36 +00:00
parent 6bd30a997e
commit 07de65c37e
4 changed files with 84 additions and 94 deletions
+9 -12
View File
@@ -2,24 +2,21 @@ name: PR Checks
on:
pull_request:
branches: [master]
jobs:
hadolint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Hadolint
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
continue-on-error: true
- uses: actions/checkout@df4cb1c069e1874edd31b4111f1884172cec0e10 # v6
- uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
with:
dockerfile: Dockerfile
build-test:
runs-on: ubuntu-latest
needs: hadolint
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Build image
run: docker build -t ci-image:${{ github.sha }} .
- name: Run tests
run: bash tests/test.sh ci-image:${{ github.sha }}
- uses: actions/checkout@df4cb1c069e1874edd31b4111f1884172cec0e10 # v6
- uses: docker/setup-buildx-action@d7f5e7f509e9e45cece5cec9e8c9e4f5afdd7de9 # v4
- run: docker build -t ci-image:${{ github.sha }} .
- run: bash tests/test.sh ci-image:${{ github.sha }}