Skip to content

Commit

Permalink
dekaf: Update CI logic to use git describe for SHA-like tags to mat…
Browse files Browse the repository at this point in the history
…ch Flow image tagging
  • Loading branch information
jshearer committed Sep 10, 2024
1 parent efe6e06 commit ed746e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/dekaf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | \
docker login --username ${{ github.actor }} --password-stdin ghcr.io
- name: Run git describe
id: git_describe
run: echo "describe_output=$(git describe --dirty --tags)" >> $GITHUB_OUTPUT
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image.
# The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
Expand All @@ -37,7 +40,7 @@ jobs:
images: ghcr.io/estuary/dekaf
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=sha
type=raw,value=${{steps.git_describe.outputs.describe_output}}
type=ref,event=branch
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
Expand Down

0 comments on commit ed746e7

Please sign in to comment.