Skip to content

Commit

Permalink
fix: workflow name based on inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
snorrees committed Nov 4, 2022
1 parent e5086cc commit 75c8932
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
@@ -1,6 +1,16 @@
---
name: CI & Release

# Workflow name based on selected inputs. Fallback to default Github naming when expression evaluates to empty string
run-name: >-
${{
inputs.release && inputs.test && 'Build ➤ Test ➤ Publish to NPM' ||
inputs.release && !inputs.test && 'Build ➤ Skip Tests ➤ Publish to NPM' ||
github.event_name == 'workflow_dispatch' && inputs.test && 'Build ➤ Test' ||
github.event_name == 'workflow_dispatch' && !inputs.test && 'Build ➤ Skip Tests' ||
''
}}
on:
# Build on pushes branches that have a PR (including drafts)
pull_request:
Expand Down
10 changes: 10 additions & 0 deletions assets/inject/semver-workflow/.github/workflows/main.yml
@@ -1,6 +1,16 @@
---
name: CI & Release

# Workflow name based on selected inputs. Fallback to default Github naming when expression evaluates to empty string
run-name: >-
${{
inputs.release && inputs.test && 'Build ➤ Test ➤ Publish to NPM' ||
inputs.release && !inputs.test && 'Build ➤ Skip Tests ➤ Publish to NPM' ||
github.event_name == 'workflow_dispatch' && inputs.test && 'Build ➤ Test' ||
github.event_name == 'workflow_dispatch' && !inputs.test && 'Build ➤ Skip Tests' ||
''
}}
on:
# Build on pushes branches that have a PR (including drafts)
pull_request:
Expand Down

0 comments on commit 75c8932

Please sign in to comment.