Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/release-image.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,41 @@
name: Release Image

on:
push:
tags:
- v*
workflow_dispatch:
inputs:
image-tag:
description: "The tag of docker image"
required: false
default: 'latest'

env:
RELEASE_VERSION: ${{ github.ref_name }}

jobs:
image-tag:
runs-on: ubuntu-latest
outputs:
tag-name: ${{ steps.get_tag_name.outputs.tag_name }}
steps:
- name: Get Tag Name
id: get_tag_name
run: |
TAG_NAME="${{ inputs.image-tag }}"
if [[ -z "${TAG_NAME}" ]]; then
RELEASE_VERSION=${GITHUB_REF#refs/tags/}
TAG_NAME=${RELEASE_VERSION}
fi
echo tag_name=$TAG_NAME >> $GITHUB_OUTPUT

release-image:
needs: [ image-tag ]
uses: apecloud/apecloud-cd/.github/workflows/release-image-cache.yml@v0.1.32
with:
IMG: "apecloud/datasafed"
VERSION: "${{ inputs.image-tag }}"
VERSION: "${{ needs.image-tag.outputs.tag-name }}"
GO_VERSION: "1.21"
APECD_REF: "v0.1.32"
DOCKERFILE_PATH: "./Dockerfile"
Expand Down