Skip to content

Commit

Permalink
use a 'latest' tag for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
djeebus committed Mar 22, 2024
1 parent 946b84b commit 6b55d13
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/actions/build-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ inputs:
image_tag:
description: The image tag
required: true
tag_latest:
description: Tag latest as well as the provided tag
default: "false"
token:
description: Github token
required: true
Expand Down Expand Up @@ -40,6 +43,6 @@ runs:
run: >-
./earthly
--push
+build
+docker-multiarch${{ inputs.tag_latest != 'false' && format('-latest --LATEST_IMAGE_NAME=ghcr.io/{0}:latest', github.repository) || '' }}
--GIT_TAG=${{ inputs.image_tag }}
--IMAGE_NAME=ghcr.io/${{ github.repository }}:${{ inputs.image_tag }}
1 change: 1 addition & 0 deletions .github/workflows/on_release_published.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:
- uses: ./.github/actions/build-image
with:
image_tag: ${{ github.ref_name }}
tag_latest: true
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
earthly 0.7.23
earthly 0.8.6
golang 1.21.6
golangci-lint 1.56.1
helm 3.12.2
Expand Down
12 changes: 11 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ ci-helm:
BUILD +test-helm
BUILD +release-helm

build:
docker-multiarch:
BUILD --platform=linux/amd64 --platform=linux/arm64 +docker

docker-multiarch-latest:
BUILD --platform=linux/amd64 --platform=linux/arm64 +docker-latest

release:
BUILD --platform=linux/amd64 --platform=linux/arm64 +docker
BUILD +release-helm
Expand Down Expand Up @@ -131,6 +134,13 @@ docker:
ARG --required IMAGE_NAME
SAVE IMAGE --push $IMAGE_NAME

docker-latest:
FROM +docker

ARG --required LATEST_IMAGE_NAME

SAVE IMAGE --push $LATEST_IMAGE_NAME

dlv:
ARG --required GOLANG_VERSION

Expand Down
4 changes: 2 additions & 2 deletions charts/kubechecks/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: kubechecks
description: A Helm chart for kubechecks
version: 0.4.3
appVersion: "1.3.3"
version: 0.4.4
appVersion: latest
type: application
maintainers:
- name: zapier

0 comments on commit 6b55d13

Please sign in to comment.