Skip to content

Commit

Permalink
Merge pull request #1789 from 1nzexi/main
Browse files Browse the repository at this point in the history
fixed: added regex validation for version name formatting
  • Loading branch information
dadiorchen authored Jul 2, 2024
2 parents 1c5f3f4 + 65f94bd commit 292e998
Showing 1 changed file with 6 additions and 4 deletions.
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

0 comments on commit 292e998

Please sign in to comment.