Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
carlcsaposs-canonical committed Nov 29, 2023
1 parent 17bc2e9 commit 222411a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/_get_workflow_version_self_hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,15 @@ jobs:
# Example: "octocat/hello-world/.github/workflows/my-workflow.yml@refs/heads/my_branch"
CALLER_WORKFLOW_REF_PATH = "${{ github.workflow_ref }}"
# Example: "869c292bc86e1157c20c514e112520808c351f11"
CALLER_WORKFLOW_COMMIT_SHA = "${{ github.workflow_sha }}"
# Replace ref with commit hash (in case the ref has changed)
# Example: "octocat/hello-world/.github/workflows/my-workflow.yml@869c292bc86e1157c20c514e112520808c351f11"
caller_workflow_commit_path = (
f'{CALLER_WORKFLOW_REF_PATH.split("@")[0]}@{CALLER_WORKFLOW_COMMIT_SHA}'
)
versions = get_versions_from_workflow_file(CALLER_WORKFLOW_REF_PATH)
versions = get_versions_from_workflow_file(caller_workflow_commit_path)
assert (
len(versions) > 0
Expand Down

0 comments on commit 222411a

Please sign in to comment.