Skip to content

Commit 2b9f1b4

Browse files
committed
chore: add optional ref input
1 parent 191d605 commit 2b9f1b4

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

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

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

0 commit comments

Comments
 (0)