Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 26cda18

Browse files
author
James Carnegie
committed
Only release on tags
1 parent a8ef14e commit 26cda18

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Release
22

33
on:
44
push:
5-
branches:
6-
- main
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
77

88
jobs:
99
releases-matrix:
@@ -26,6 +26,6 @@ jobs:
2626
goarch: ${{ matrix.goarch }}
2727
goversion: 1.19.1
2828
binary_name: "pod-atomisthq-tools.docker"
29-
release_tag: v0.${{ github.run_number }}.${{ github.run_attempt }}
29+
release_tag: ${{github.ref_name}}
3030
overwrite: TRUE
3131
compress_assets: OFF

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Background
22

3-
This is a [babashka pod](https://github.com/babashka/pods) that binds some golang functions into a clojure namespace. Using this pod, clojure programs can parse dockerfiles and docker images names using the "official" docker golang libraries.
3+
This is a [babashka pod](https://github.com/babashka/pods) that binds some golang functions into a clojure namespace. Using this pod, clojure programs can parse dockerfiles and docker images names using the "official" docker golang libraries.
44

55
* [`github.com/docker/distribution/reference`](https://github.com/distribution/distribution/blob/main/reference/reference.go) (for image name parsing)
66
* [`github.com/moby/buildkit/frontend/dockerfile/parser`](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/parser/parser.go) (for generating a Dockerfile AST).
@@ -16,13 +16,13 @@ This is a [babashka pod](https://github.com/babashka/pods) that binds some golan
1616
;; load-pod will create this namespace with two vars
1717
(require '[pod.atomisthq.docker :as docker])
1818

19-
;; parse image names using github.com/docker/distribution
19+
;; parse image names using github.com/docker/distribution
2020
;; turns golang structs into clojure maps
21-
(docker/parse-image-name "gcr.io/whatever:tag")
21+
(docker/parse-image-name "gcr.io/whatever:tag")
2222
;; automatically turns golang errors into Exceptions
2323
(try
2424
(docker/parse-image-name "gcr.io/whatever/:tag")
25-
(catch Exception e
25+
(catch Exception e
2626
;; invalid reference format
2727
(println (.getMessage e))))
2828

@@ -47,6 +47,10 @@ Create `vonwig/pod-atomisthq-tools.docker` which is a manifest list with pod bin
4747
bb build-pod-image
4848
```
4949

50+
## Releasing
51+
52+
Pushing a tag (like v0.1.1) will cause a GitHub release to be created
53+
5054
## Namespace generation
5155

5256
The `pods/load-pod` call is convenient for a repl-session, or a script, but what if you are `aot` compiling, or building a native binary. In the example above, the namespaces emitted by `pods/load-pod` are not available until runtime.
@@ -83,8 +87,8 @@ Here is an example of bindings that will resolve at compile-time and go through
8387

8488
;; async example
8589
(defn generate-sbom [s]
86-
(impl/invoke-public "pod.atomisthq.docker" "pod.atomisthq.docker/-generate-sbom"
87-
[s cb]
90+
(impl/invoke-public "pod.atomisthq.docker" "pod.atomisthq.docker/-generate-sbom"
91+
[s cb]
8892
{:handlers {:done (fn [])
8993
:success cb
9094
:error (fn [err]}})))

0 commit comments

Comments
 (0)