|
@@ -31,6 +31,16 @@ jobs:
|
|
|
username: ${{ github.actor }}
|
|
username: ${{ github.actor }}
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
|
+ - name: Determine version
|
|
|
|
|
+ id: version
|
|
|
|
|
+ run: |
|
|
|
|
|
+ if [[ "${{ github.ref_type }}" == "tag" ]]; then
|
|
|
|
|
+ echo "value=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
|
|
|
|
|
+ else
|
|
|
|
|
+ TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "development")
|
|
|
|
|
+ echo "value=${TAG}" >> "$GITHUB_OUTPUT"
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
- name: Extract metadata (tags, labels)
|
|
- name: Extract metadata (tags, labels)
|
|
|
id: meta
|
|
id: meta
|
|
|
uses: docker/metadata-action@v5
|
|
uses: docker/metadata-action@v5
|
|
@@ -47,5 +57,7 @@ jobs:
|
|
|
push: true
|
|
push: true
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
|
+ build-args: |
|
|
|
|
|
+ APP_VERSION=${{ steps.version.outputs.value }}
|
|
|
cache-from: type=gha
|
|
cache-from: type=gha
|
|
|
cache-to: type=gha,mode=max
|
|
cache-to: type=gha,mode=max
|