Skip to content

Commit

Permalink
feat(release): add override for workflow dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfourzerofour committed Jan 31, 2024
1 parent 4329378 commit 01fc2e0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Docker release

on:
workflow_dispatch:
inputs:
version:
required: true
type: string
push:
tags:
- v*.*.*
Expand Down Expand Up @@ -50,4 +54,9 @@ jobs:
- name: Build and push image
run: |
cargo install cross --git https://github.com/cross-rs/cross
sudo -E env "PATH=$PATH" make docker-build-latest
if [ -n "${{ github.event.inputs.version }}" ]; then
make GIT_TAG=${github.event.inputs.version} docker-build
else
sudo -E env "PATH=$PATH" make docker-build-latest
fi
11 changes: 10 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ name: Release

on:
workflow_dispatch:
inputs:
version:
required: true
type: string
push:
tags:
- v*.*.*
Expand All @@ -14,7 +18,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Extract version
run: echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
else
echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
fi
id: extract_version
outputs:
VERSION: ${{ steps.extract_version.outputs.VERSION }}
Expand Down

0 comments on commit 01fc2e0

Please sign in to comment.