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

chore: Create tag workflow updated #41

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .github/workflows/check_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Check Version

on:
workflow_call:
secrets:
TRIGGER_NEXT_ACTION:
required: true
description: 'Trigger Next Action'

pull_request:
branches:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/create_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ jobs:

call-check-version:
uses: ./.github/workflows/check_version.yml
secrets:
TRIGGER_NEXT_ACTION: ${{ secrets.TRIGGER_NEXT_ACTION }}

call-trigger-create-tag-and-publish:
uses: ./.github/workflows/trigger_on_pr_merge.yml
secrets:
TRIGGER_CREATE_TAG_AND_PUBLISH: ${{ secrets.TRIGGER_CREATE_TAG_AND_PUBLISH }}

create-tag-and-publish:
permissions:
Expand All @@ -31,7 +35,7 @@ jobs:
needs: [placeholder-job, call-check-version, call-trigger-create-tag-and-publish]


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

steps:
- uses: actions/checkout@v3
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/trigger_on_pr_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ name: Trigger Create Tag and Publish Workflow on PR Merge

on:
workflow_call:

secrets:
TRIGGER_CREATE_TAG_AND_PUBLISH:
required: true
description: |
Set to true to trigger the Create Tag and Publish workflow.
Set to false to not trigger the Create Tag and Publish workflow.
Set to anything else to not trigger the Create Tag and Publish workflow.

pull_request:
types:
- closed
Expand All @@ -23,6 +30,7 @@ jobs:

- name: Set trigger_create_tag_and_publish output
id: set_output
run: echo "set-env:TRIGGER_CREATE_TAG_AND_PUBLISH=${{ steps.check_merged.outputs.outputs.result}}" >> $GITHUB_ENV
env:
TRIGGER_CREATE_TAG_AND_PUBLISH: ${{ steps.check_merged.outputs.outputs.result}}
run: echo "set-env:TRIGGER_CREATE_TAG_AND_PUBLISH=${{ steps.check_merged.outputs.outputs.result}}" >> $GITHUB_ENV

Loading