Skip to content

Commit

Permalink
Merge pull request #40 from kushalmahapatro/fix/github-actions
Browse files Browse the repository at this point in the history
chore: Create tag workflow updated
  • Loading branch information
kushalmahapatro authored Sep 4, 2023
2 parents 4de6905 + 39dd5ca commit 461b4eb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/check_version.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Check Version

on:
workflow_call:

pull_request:
branches:
- main
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/create_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
steps:
- name: Placeholder Step
run: echo "This is a placeholder job"

call-check-version:
uses: ./.github/workflows/check_version.yml

call-trigger-create-tag-and-publish:
uses: ./.github/workflows/trigger_on_pr_merge.yml

create-tag-and-publish:
permissions:
Expand All @@ -22,9 +28,10 @@ jobs:
pull-requests: write

runs-on: ubuntu-latest
needs: [placeholder-job, check-version, trigger-create-tag-and-publish]
needs: [placeholder-job, call-check-version, call-trigger-create-tag-and-publish]


if: ${{ needs.check-version.outputs.TRIGGER_NEXT_ACTION == 'true' && needs.trigger-create-tag-and-publish.outputs.TRIGGER_CREATE_TAG_AND_PUBLISH == 'true' }}
if: ${{ needs.call-check-version.outputs.TRIGGER_NEXT_ACTION == 'true' && needs.call-trigger-create-tag-and-publish.outputs.TRIGGER_CREATE_TAG_AND_PUBLISH == 'true' }}

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pull_request_opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:

pr-labeler:
name: Label the PR based on the branch
# needs: security_hardening
permissions:
contents: read
pull-requests: write
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/trigger_on_pr_merge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Trigger Create Tag and Publish Workflow on PR Merge

on:
workflow_call:

pull_request:
types:
- closed
Expand Down

0 comments on commit 461b4eb

Please sign in to comment.