CI: standardize workflows - tests mandatory, remove :latest push on master #12
Reference in New Issue
Block a user
Delete Branch "fix/workflow-standard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR standardizes the CI workflows across main, cron, and tag triggers.
Changes
All three workflows (main.yaml, cron.yaml, tag.yaml)
testjob with hadolint linting followed bydocker build+bash tests/test.shtestto pass vianeeds: [test]main.yaml (push to master)
build-pushinto separatebuild(image build only, no push) andtag(auto-tagging) jobsbuildjob uses plaindocker build(not build-push-action)tagjob usesanothrNick/github-tag-actionwithSA_TOKEN_ACTION_PUSH_TAGSsecret:latestpush on master branchcron.yaml (nightly schedule)
30 3 * * 3)build-pushjob now requirestestfirst:latesttag — only publishes{tag}-latestwhen a tag existsget-latest-tagstep to discover the most recent git tagtag.yaml (tag push)
build-pushjob now requirestestfirst-latestsuffix tag alongside thetype=ref,event=tagtagpr.yaml
Rationale
:lateston every master push, which was overwriting stable tagged releases:vX.Y.Zand:vX.Y.Z-latestfor flexible consumption