test: add Docker build test workflow for PR validation (#33)

* test: add Docker build test workflow for PR validation

* fix: use dockerx command without upload flag for testing

* testing docker upload

* nit

* bet

* remove
This commit is contained in:
Cal Bera 2025-07-25 12:46:16 -07:00 committed by GitHub
parent 3058f19298
commit 6a308e75b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

3
.gitignore vendored
View file

@ -59,3 +59,6 @@ cmd/workload/workload
# claude # claude
.claude .claude
# for testing docker builds
.github/workflows/docker-test.yml

View file

@ -174,9 +174,12 @@ func LocalEnv() Environment {
if info, err := os.Stat(".git/objects"); err == nil && info.IsDir() && env.Tag == "" { if info, err := os.Stat(".git/objects"); err == nil && info.IsDir() && env.Tag == "" {
// Try to get tag at HEAD first // Try to get tag at HEAD first
env.Tag = firstLine(RunGit("tag", "-l", "--points-at", "HEAD")) env.Tag = firstLine(RunGit("tag", "-l", "--points-at", "HEAD"))
// If no tag points at HEAD, get the most recent tag // If no tag points at HEAD, try to get the most recent tag
if env.Tag == "" { if env.Tag == "" {
env.Tag = firstLine(RunGit("describe", "--tags", "--abbrev=0")) // Check if there are any tags at all before trying git describe
if tags := RunGit("tag", "-l"); tags != "" {
env.Tag = firstLine(RunGit("describe", "--tags", "--abbrev=0"))
}
} }
} }
return env return env