ci(main): tag both SHA and latest during build, push both in one step
This commit is contained in:
@@ -49,14 +49,10 @@ jobs:
|
|||||||
docker build \
|
docker build \
|
||||||
--build-arg "VERSION=${{ steps.sha.outputs.short_sha }}" \
|
--build-arg "VERSION=${{ steps.sha.outputs.short_sha }}" \
|
||||||
-t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \
|
-t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \
|
||||||
|
-t "${IMAGE}:latest" \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Push
|
- name: Push
|
||||||
run: |
|
run: |
|
||||||
docker push "${IMAGE}:${{ steps.sha.outputs.short_sha }}"
|
docker push "${IMAGE}:${{ steps.sha.outputs.short_sha }}"
|
||||||
docker tag "${IMAGE}:${{ steps.sha.outputs.short_sha }}" "${IMAGE}:latest"
|
|
||||||
docker push "${IMAGE}:latest"
|
docker push "${IMAGE}:latest"
|
||||||
|
|
||||||
- name: Report digest
|
|
||||||
run: |
|
|
||||||
docker inspect --format='{{index .RepoDigests 0}}' "${IMAGE}:${{ steps.sha.outputs.short_sha }}"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user