Skip to content

Commit d9a2830

Browse files
committed
can use branch ref also
1 parent ea39b5e commit d9a2830

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/build-and-release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
description: 'Version - patch version of the release (e.g. x.y.z)'
99
required: true
1010
type: string
11-
backup-utils-release-commit:
12-
description: 'Backup Utils Release Commit - sha of the commit to associate with backup-utils release. If blank, an empty commit will be created on master'
11+
branch-ref-or-commit:
12+
description: 'Branch ref or commit - the backup-utils release will associated with the branch ref or commit provided. If blank, an empty commit will be created on master'
1313
required: false
1414
type: string
1515
draft:
@@ -84,14 +84,14 @@ jobs:
8484
owner: ${{ github.repository_owner }}
8585
repositories: "backup-utils,backup-utils-private"
8686
- name: Checkout backup-utils
87-
if: github.event.inputs.backup-utils-release-commit == ''
87+
if: github.event.inputs.branch-ref-or-commit == ''
8888
uses: actions/checkout@v4
8989
with:
9090
token: ${{ steps.app-token.outputs.token }}
9191
repository: github/backup-utils
9292
ref: master
9393
- name: Create empty commit
94-
if: github.event.inputs.backup-utils-release-commit == ''
94+
if: github.event.inputs.branch-ref-or-commit == ''
9595
uses: stefanzweifel/git-auto-commit-action@v4
9696
id: empty-commit
9797
with:
@@ -105,12 +105,12 @@ jobs:
105105
- name: Resolve release commit
106106
id: resolve-release-commit
107107
run: |
108-
if [[ -z "${{ github.event.inputs.backup-utils-release-commit }}" ]]; then
108+
if [[ -z "${{ github.event.inputs.branch-ref-or-commit }}" ]]; then
109109
echo "Using empty commit sha for release commit"
110110
echo "release-commit=\"${{ steps.empty-commit.outputs.commit_hash }}\"" >> "$GITHUB_OUTPUT"
111111
else
112112
echo "Using provided commit sha for release commit"
113-
echo "release-commit=\"${{ github.event.inputs.backup-utils-release-commit }}\"" >> "$GITHUB_OUTPUT"
113+
echo "release-commit=\"${{ github.event.inputs.branch-ref-or-commit }}\"" >> "$GITHUB_OUTPUT"
114114
fi
115115
# need backup-utils-private for release notes
116116
- name: Checkout backup-utils-private

0 commit comments

Comments
 (0)