Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: added regex validation for version name formatting #1789

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/deploy-main-channel-to-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
if: |
!contains(github.event.head_commit.message, 'skip-ci')
steps:
- name: Validate git-tag input format
run: |
if [[ ! "${{ github.event.inputs.git-tag }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Invalid git-tag format. Please use the format 'X.Y.Z' (e.g., '2.9.3')." >&2
exit 1
fi
- uses: actions/checkout@v2
with:
ref: main
Expand Down Expand Up @@ -44,16 +50,13 @@ jobs:
NODE_ENV: production
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build snapshot and push on merge
id: docker_build_release
uses: docker/build-push-action@v2
Expand All @@ -62,7 +65,6 @@ jobs:
file: ./Dockerfile-dev
push: true
tags: greenstand/${{ github.event.repository.name }}-dev:${{ steps.package-version.outputs.current-version }}

- id: export_bumped_version
run: |
export BUMPED_VERSION="${{ steps.package-version.outputs.current-version }}"
Expand Down
Loading