Skip to content

Commit

Permalink
ci: add workflow dispatch to release action
Browse files Browse the repository at this point in the history
Signed-off-by: Rory Z <[email protected]>
  • Loading branch information
Rory-Z committed Sep 25, 2024
1 parent 8a2fb89 commit 2bd069b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
path: frontend

- name: use node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: 'frontend/.nvmrc'

Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@ on:
push:
tags:
- "*"
workflow_dispatch:
inputs:
tag:
description: 'Ref to release'
required: true
default: HEAD

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'push' && github.ref || inputs.tag }}
- name: Check helm
if: github.event_name == 'push'
run: |
version=$(grep -E "^version" deploy/charts/emqx-operator/Chart.yaml | grep -oE "[0-9]+\.[0-9]+\.[0-9]+(-(alpha|beta|rc)\.[0-9])?")
if [ "$version" != "${GITHUB_REF##*/}" ]; then
Expand Down Expand Up @@ -42,7 +51,7 @@ jobs:
with:
images: |
${{ github.repository_owner }}/emqx-operator-controller
ghcr.io/${{ github.repository_owner }}/emqx-operator-controller
ghcr.io/${{ github.repository_owner }}/emqx-operator
tags: |
type=ref,event=branch
type=ref,event=pr
Expand Down

0 comments on commit 2bd069b

Please sign in to comment.