Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 29d120a

Browse files
committed
Add run name and prevent non-dry-run releases on non-main branches
1 parent f5e8d59 commit 29d120a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# GitHub release workflow.
22
name: Release
3+
run-name: Release ${{ github.workflow_ref }}${{ inputs.dry_run && ' (DRY RUN)' || '' }}
34
on:
45
workflow_dispatch:
56
inputs:
@@ -54,6 +55,10 @@ jobs:
5455
# Necessary for Docker manifest
5556
DOCKER_CLI_EXPERIMENTAL: "enabled"
5657
steps:
58+
- name: Prevent non-dry-run releases on branches
59+
if: ${{ github.action_ref != 'main' && !inputs.dry_run }}
60+
run: exit 1
61+
5762
- uses: actions/checkout@v3
5863
with:
5964
fetch-depth: 0

0 commit comments

Comments
 (0)