Skip to content

Commit dcee1f5

Browse files
committed
add checkout-ref to release workflow
1 parent d00a6d4 commit dcee1f5

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/run_publish_site.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ name: Publish Site
33

44
on:
55
workflow_dispatch:
6+
inputs:
7+
checkout-ref:
8+
description: "The repository reference to checkout"
9+
required: false
10+
type: string
611
workflow_call:
12+
inputs:
13+
checkout-ref:
14+
description: "The repository reference to checkout"
15+
required: false
16+
type: string
717

818

919
concurrency:
@@ -18,6 +28,8 @@ jobs:
1828
steps:
1929
- name: Checkout the repo
2030
uses: actions/checkout@v3
31+
with:
32+
ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}
2133

2234
- name: Validate Gradle Wrapper
2335
uses: gradle/wrapper-validation-action@v1

.github/workflows/workflow_release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
checks: write
3737
contents: write
3838
packages: write
39+
with:
40+
checkout-ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}
3941

4042
publish-site:
4143
needs: tests
@@ -48,3 +50,5 @@ jobs:
4850
id-token: write # to verify the deployment originates from an appropriate source
4951
packages: write
5052
pages: write # to deploy to Pages
53+
with:
54+
checkout-ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}

0 commit comments

Comments
 (0)