Skip to content

Commit

Permalink
fix: release ci (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
fearlessfe authored Jan 17, 2025
1 parent 785cbfd commit cb90e51
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: shisui release image

on:
push:
tags:
- v*
release:
types: [created]

defaults:
run:
Expand All @@ -17,7 +16,9 @@ permissions:
contents: write

env:
releaseBuild: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
push_image_to_github:
Expand All @@ -34,10 +35,19 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=semver,pattern={{raw}}
- name: Build and push Docker image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit cb90e51

Please sign in to comment.