Skip to content

Commit

Permalink
Parameterize the README path to account for mutiple image repositorie…
Browse files Browse the repository at this point in the history
…s in the same Git project
  • Loading branch information
cccs-rs committed Dec 23, 2024
1 parent 16d0081 commit 238c977
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pipelines/templates/steps/publish-description.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ parameters:
# Repository name in Github
- name: github_repo
type: string
# Path to the README file in the artifact
- name: readme_path
type: string
default: "README.md"

steps:
- bash: |
Expand Down Expand Up @@ -69,7 +73,7 @@ steps:
git_repo = "${{ parameters.github_repo }}"
docker_repo ="${{ parameters.dockerhub_repo }}" or git_repo
readme_path = os.path.join("$(Pipeline.Workspace)/working", git_repo, "README.md")
readme_path = os.path.join("$(Pipeline.Workspace)/working", git_repo, "${{ parameters.readme_path }}R")
if os.path.exists(readme_path):
with open(readme_path) as f:
Expand Down

0 comments on commit 238c977

Please sign in to comment.