Skip to content

Commit

Permalink
fix(ci): changing to the latest and manual tags
Browse files Browse the repository at this point in the history
  • Loading branch information
geekbrother committed Jan 22, 2024
1 parent 1c4ae82 commit e68de6a
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/dispatch_deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ⚙️ Deploy
run-name: "Deploy: ${{ github.sha }} ➠ ${{ inputs.version }}${{ (!inputs.deploy-infra && !inputs.deploy-app) && ' 👀 deploy nothing' || ''}}${{ inputs.deploy-infra && ' ❱❱  infra' || '' }}${{ inputs.deploy-app && ' ❱❱  app' || '' }}"
run-name: "Deploy: ${{ github.sha }} ➠ ${{ inputs.version-type }}:${{ inputs.version-tag }}${{ (!inputs.deploy-infra && !inputs.deploy-app) && ' 👀 deploy nothing' || ''}}${{ inputs.deploy-infra && ' ❱❱  infra' || '' }}${{ inputs.deploy-app && ' ❱❱  app' || '' }}"

on:
workflow_dispatch:
Expand All @@ -22,11 +22,18 @@ on:
- prod
default: staging
required: true
version:
version-type:
description: "Release Version"
type: string
required: true
type: choice
options:
- latest
- manual
default: 'latest'
required: true
version-tag:
description: "Release Version Tag (for manual version)"
type: string
default: ''

concurrency: deploy

Expand All @@ -51,10 +58,10 @@ jobs:
- name: Select target version
id: select_version
run: |
if [ "${{ inputs.version }}" == "latest" ]; then
if [ "${{ inputs.version-type }}" == "latest" ]; then
echo "version=$(git tag | sort --version-sort | tail -n1)" >> "$GITHUB_OUTPUT"
else
echo "version=${{ inputs.version }}" >> "$GITHUB_OUTPUT"
echo "version=${{ inputs.version-tag }}" >> "$GITHUB_OUTPUT"
fi
outputs:
version: ${{ steps.select_version.outputs.version }}
Expand Down

0 comments on commit e68de6a

Please sign in to comment.