Skip to content

Commit 292e998

Browse files
authored
Merge pull request #1789 from 1nzexi/main
fixed: added regex validation for version name formatting
2 parents 1c5f3f4 + 65f94bd commit 292e998

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/deploy-main-channel-to-dev.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ jobs:
1616
if: |
1717
!contains(github.event.head_commit.message, 'skip-ci')
1818
steps:
19+
- name: Validate git-tag input format
20+
run: |
21+
if [[ ! "${{ github.event.inputs.git-tag }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
22+
echo "Error: Invalid git-tag format. Please use the format 'X.Y.Z' (e.g., '2.9.3')." >&2
23+
exit 1
24+
fi
1925
- uses: actions/checkout@v2
2026
with:
2127
ref: main
@@ -44,16 +50,13 @@ jobs:
4450
NODE_ENV: production
4551
- name: Set up QEMU
4652
uses: docker/setup-qemu-action@v1
47-
4853
- name: Set up Docker Buildx
4954
uses: docker/setup-buildx-action@v1
50-
5155
- name: Login to DockerHub
5256
uses: docker/login-action@v1
5357
with:
5458
username: ${{ secrets.DOCKERHUB_USERNAME }}
5559
password: ${{ secrets.DOCKERHUB_TOKEN }}
56-
5760
- name: Build snapshot and push on merge
5861
id: docker_build_release
5962
uses: docker/build-push-action@v2
@@ -62,7 +65,6 @@ jobs:
6265
file: ./Dockerfile-dev
6366
push: true
6467
tags: greenstand/${{ github.event.repository.name }}-dev:${{ steps.package-version.outputs.current-version }}
65-
6668
- id: export_bumped_version
6769
run: |
6870
export BUMPED_VERSION="${{ steps.package-version.outputs.current-version }}"

0 commit comments

Comments
 (0)