Skip to content

Commit

Permalink
Merge pull request #8 from Food-fusion-Fiap/feat/ms-decomposition-nosql
Browse files Browse the repository at this point in the history
Feat/ms decomposition nosql
  • Loading branch information
mmatheusbr authored Jul 11, 2024
2 parents a24e6a9 + 9aadd34 commit 933ea77
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/ci-cd-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ on:
push:
branches:
- main
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name to create'
required: true

permissions:
contents: write
Expand Down Expand Up @@ -151,14 +146,15 @@ jobs:
run: echo "::set-output name=next_tag::v1.0.0" # Example logic to set the tag name

- name: Push new tag to GitHub
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: actions/github-script@v5
with:
script: |
const tag = "${{ github.event.inputs.tag_name || steps.tagger.outputs.next_tag }}";
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${tag}`,
sha: context.sha
})
id: create_tag
run: |
latest_tag=$(git describe --tags --abbrev=0)
# Assuming your versioning scheme is numeric (e.g., vX.Y.Z)
version="${latest_tag//v/}"
IFS='.' read -r -a parts <<< "$version"
major="${parts[0]}"
minor="${parts[1]}"
patch="${parts[2]}"
new_version="v$major.$((minor + 1)).0" # Increment minor version
git tag "$new_version"
git push origin "$new_version"

0 comments on commit 933ea77

Please sign in to comment.