feat: add step to generate PEP 440 version and update build-args to use it
This commit is contained in:
@@ -62,6 +62,15 @@ jobs:
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=ref,event=tag
|
||||
|
||||
- name: Determine PEP 440 Version for Python Package
|
||||
id: pkg_version
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
|
||||
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "version=0.0.dev${{ github.run_number }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
@@ -70,7 +79,7 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
build-args: VERSION=${{ steps.meta.outputs.version }}
|
||||
build-args: VERSION=${{ steps.pkg_version.outputs.version }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
|
||||
|
||||
Reference in New Issue
Block a user