File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,12 @@ def _download_ref_asset(ext):
62
62
repo = os .getenv ("GITHUB_REPOSITORY" )
63
63
ref = os .getenv ("GITHUB_REF" )
64
64
65
- artifact = Path (f"/tmp/{ os .getenv ('GITHUB_REF_NAME' )} .{ ext } " )
65
+ # NOTE: Branch names often have `/` in them (e.g. `feat/some-name`),
66
+ # which would break the artifact path we construct below.
67
+ # We "fix" these by lossily replacing all `/` with `-`.
68
+ ref_name_normalized = os .getenv ("GITHUB_REF_NAME" ).replace ("/" , "-" )
69
+
70
+ artifact = Path (f"/tmp/{ ref_name_normalized } .{ ext } " )
66
71
67
72
# GitHub supports /:org/:repo/archive/:ref<.tar.gz|.zip>.
68
73
r = requests .get (f"https://github.com/{ repo } /archive/{ ref } .{ ext } " , stream = True )
Original file line number Diff line number Diff line change 1
- sigstore ~= 1.1
1
+ sigstore ~= 1.1.2
2
2
requests ~= 2.28
You can’t perform that action at this time.
0 commit comments