ci: add docker build to release and publish

ci: add assets to semantic-release
This commit is contained in:
Krise
2023-08-02 20:05:45 +00:00
parent bd902e99fe
commit 466754f8a3
4 changed files with 77 additions and 13 deletions

View File

@@ -20,11 +20,6 @@ jobs:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name }}
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
@@ -37,11 +32,17 @@ jobs:
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,enable=true,priority=600,prefix=v,suffix=,event=tag
- name: Build and push Docker image
uses: docker/build-push-action@v6
- name: Set short git commit SHA
id: vars
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "::set-output name=short_sha::$calculatedSha"
- name: Push image
uses: akhilerm/tag-push-action@v2.1.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
src: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.short_sha }}
dst: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }}