File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Release Docker Image
22
33on :
4+ push :
5+ branches : [main]
6+ paths :
7+ - ' rust/**'
8+ - ' docker/**'
9+ - ' .github/workflows/release.yml'
10+ - ' .github/workflows/docker-build.yml'
411 workflow_dispatch :
512 inputs :
613 bump :
@@ -26,6 +33,7 @@ permissions:
2633
2734jobs :
2835 version :
36+ if : github.actor != 'github-actions[bot]'
2937 runs-on : ubuntu-latest
3038 outputs :
3139 version : ${{ steps.new.outputs.version }}
4452 CURRENT="$(tr -d '[:space:]' < VERSION)"
4553 IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
4654
47- case "${{ inputs.bump }}" in
55+ BUMP="${{ inputs.bump || 'patch' }}"
56+
57+ case "$BUMP" in
4858 major)
4959 NEW_VERSION="$((MAJOR + 1)).0.0"
5060 ;;
5767 custom)
5868 NEW_VERSION="${{ inputs.custom_version }}"
5969 ;;
70+ *)
71+ echo "Invalid bump type: $BUMP" >&2
72+ exit 1
73+ ;;
6074 esac
6175
6276 if [[ ! "$NEW_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]; then
You can’t perform that action at this time.
0 commit comments