Skip to content

Commit

Permalink
chore: add optional ref input
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarAlJarrah committed Jan 23, 2025
1 parent a647711 commit f932494
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/generate-docs-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,27 @@ on:
description: 'Branch or tag to deploy reference docs from. Defaults to current branch.'
type: string
required: false
default: ${{ github.ref_name }}
default: ''

permissions:
id-token: write

jobs:
deploy-reference-docs:
uses: "ExpediaGroup/expediagroup-java-sdk/.github/workflows/generate-ref-docs.yaml@OmarAlJarrah/reusable-generate-reference-docs-gh-action"
with:
buildsystem: 'maven'
ref: ${{ inputs.ref }}
secrets:
GITHUB_PAT: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: Set Target Ref
shell: python -u {0}
run: |
ref = "${{ inputs.ref }}"
if ref == "":
ref = "${{ github.ref }}"
with open("$GITHUB_ENV", "a") as env_file:
print(f"TARGET_REF={ref}", file=env_file)
- uses: "ExpediaGroup/expediagroup-java-sdk/.github/workflows/generate-ref-docs.yaml@OmarAlJarrah/reusable-generate-reference-docs-gh-action"
with:
buildsystem: 'maven'
ref: ${{ inputs.ref }}
secrets:
GITHUB_PAT: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

0 comments on commit f932494

Please sign in to comment.