Skip to content

Commit f932494

Browse files
committed
chore: add optional ref input
1 parent a647711 commit f932494

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/generate-docs-site.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,27 @@ on:
77
description: 'Branch or tag to deploy reference docs from. Defaults to current branch.'
88
type: string
99
required: false
10-
default: ${{ github.ref_name }}
10+
default: ''
1111

1212
permissions:
1313
id-token: write
1414

1515
jobs:
1616
deploy-reference-docs:
17-
uses: "ExpediaGroup/expediagroup-java-sdk/.github/workflows/generate-ref-docs.yaml@OmarAlJarrah/reusable-generate-reference-docs-gh-action"
18-
with:
19-
buildsystem: 'maven'
20-
ref: ${{ inputs.ref }}
21-
secrets:
22-
GITHUB_PAT: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Set Target Ref
20+
shell: python -u {0}
21+
run: |
22+
ref = "${{ inputs.ref }}"
23+
if ref == "":
24+
ref = "${{ github.ref }}"
25+
26+
with open("$GITHUB_ENV", "a") as env_file:
27+
print(f"TARGET_REF={ref}", file=env_file)
28+
- uses: "ExpediaGroup/expediagroup-java-sdk/.github/workflows/generate-ref-docs.yaml@OmarAlJarrah/reusable-generate-reference-docs-gh-action"
29+
with:
30+
buildsystem: 'maven'
31+
ref: ${{ inputs.ref }}
32+
secrets:
33+
GITHUB_PAT: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)