Skip to content

Commit

Permalink
ci: Add step to get short SHA for Docker metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jaypatel1210 committed Nov 17, 2024
1 parent 47fa0f6 commit 47e41b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@ jobs:
echo "image_name=cloud-ide-executor" >> "$GITHUB_ENV"
fi
- name: Get short SHA
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"

- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: jaypatel1210/${{ env.image_name }}
tags: |
type=raw,value=latest
type=raw,value=${{ github.sha::7 }}
type=raw,value=${{ steps.short_sha.outputs.short_sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down

0 comments on commit 47e41b1

Please sign in to comment.