Skip to content

Commit

Permalink
set latest container image tag on every push
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdbd committed Oct 10, 2024
1 parent 4a1912e commit ec21f6d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ jobs:
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=true
annotations: |
annotation[linux/amd64].org.opencontainers.image.revision=${{ github.sha }}
annotation.org.opencontainers.image.revision=${{ github.sha }}
Expand Down
13 changes: 7 additions & 6 deletions bb.edn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
(def app-version (:version project))
(def jar (format "target/%s-%s.jar" app-name (:version project)))
(def registry-namespace "jackdbd")
(def image-tag (format "ghcr.io/%s/%s:%s" registry-namespace app-name app-version)))
(def image-tag (format "ghcr.io/%s/%s:%s" registry-namespace app-name app-version))
(def remote-image-version "latest")
(def remote-image-tag (format "ghcr.io/%s/%s:%s" registry-namespace app-name remote-image-version)))

build:bb-uber
{:doc "Build Babashka uberjar (see: https://book.babashka.org/#_uberjar)"
Expand Down Expand Up @@ -119,14 +121,13 @@
(shell cmd))}

container:dive
{:doc "Inspect the container image layers with dive"
{:doc "Inspect layers of a local container image (with dive)"
;; :depends [container:build]
:task (shell (format "dive %s" image-tag))}

container:inspect
{:doc "Inspect container image layers with skopeo"
;; :depends [container:build]
:task (shell (format "skopeo inspect docker://%s" image-tag))}
{:doc "Inspect a container image hosted on Container Registry (with skopeo)"
:task (shell (format "skopeo inspect docker://%s" remote-image-tag))}

container:push
{:doc "Push container image to GitHub Container Registry"
Expand All @@ -141,7 +142,7 @@
:task (shell (format "trivy image --severity MEDIUM,HIGH,CRITICAL -f table %s" image-tag))}

container:tags
{:doc "List all tags for the container image with skopeo"
{:doc "List all available tags for a container image hosted on Container Registry (with skopeo)"
:task (shell (format "skopeo list-tags docker://ghcr.io/%s/%s" registry-namespace app-name))}

-graph:gen
Expand Down
2 changes: 1 addition & 1 deletion docs/release-body.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ java -jar fosdem-dl-0.1.0-RC.1-standalone.jar
Visit [this page](https://github.com/jackdbd/fosdem-dl/pkgs/container/fosdem-dl) to see the list of container images, then pull the one you want. For example:

```sh
docker pull ghcr.io/jackdbd/fosdem-dl:0.1.0-rc.1
docker pull ghcr.io/jackdbd/fosdem-dl:latest
```

## Binary [TODO]
Expand Down

0 comments on commit ec21f6d

Please sign in to comment.