@@ -16,19 +16,33 @@ abstract class UntrustedArtifactDownloadStep extends Step {
16
16
abstract string getPath ( ) ;
17
17
}
18
18
19
+ class GitHubDownloadArtifactActionStep extends UntrustedArtifactDownloadStep , UsesStep {
20
+ GitHubDownloadArtifactActionStep ( ) {
21
+ // By default, the permissions are scoped so they can only download Artifacts within the current workflow run.
22
+ // To elevate permissions for this scenario, you can specify a github-token along with other repository and run identifiers
23
+ this .getCallee ( ) = "actions/download-artifact" and
24
+ this .getArgument ( "run-id" ) .matches ( "%github.event.workflow_run.id%" ) and
25
+ exists ( this .getArgument ( "github-token" ) )
26
+ }
27
+
28
+ override string getPath ( ) {
29
+ if exists ( this .getArgument ( "path" ) ) then result = this .getArgument ( "path" ) else result = ""
30
+ }
31
+ }
32
+
19
33
class DownloadArtifactActionStep extends UntrustedArtifactDownloadStep , UsesStep {
20
34
DownloadArtifactActionStep ( ) {
21
35
this .getCallee ( ) =
22
36
[
23
- "actions/ download-artifact" , "dawidd6 /action-download-artifact " ,
24
- "marcofaggian/action- download-multiple-artifacts " , "benday-inc/ download-latest -artifact" ,
25
- "blablacar /action-download-last-artifact" , "levonet /action-download-last- artifact" ,
26
- "bettermarks/action-artifact- download" , "aochmann/actions- download-artifact" ,
27
- "cytopia /download-artifact-retry-action " , "alextompkins /download-prior -artifact" ,
28
- "nmerget /download-gzip- artifact" , "benday-inc /download-artifact " ,
29
- "synergy-au/download-workflow-artifacts-action " , "ishworkh/docker -image-artifact-download" ,
30
- "ishworkh/container-image -artifact-download " , "sidx1024/action -download-artifact" ,
31
- "hyperskill/azblob-download-artifact" , " ma-ve/action-download-artifact-with-retry"
37
+ "dawidd6/action- download-artifact" , "marcofaggian /action-download-multiple-artifacts " ,
38
+ "benday-inc/ download-latest-artifact " , "blablacar/action- download-last -artifact" ,
39
+ "levonet /action-download-last-artifact" , "bettermarks /action-artifact-download " ,
40
+ "aochmann/actions- download-artifact " , "cytopia/ download-artifact-retry-action " ,
41
+ "alextompkins /download-prior-artifact " , "nmerget /download-gzip -artifact" ,
42
+ "benday-inc /download-artifact" , "synergy-au /download-workflow-artifacts-action " ,
43
+ "ishworkh/docker-image-artifact-download " , "ishworkh/container -image-artifact-download" ,
44
+ "sidx1024/action-download -artifact" , "hyperskill/azblob -download-artifact" ,
45
+ "ma-ve/action-download-artifact-with-retry"
32
46
] and
33
47
(
34
48
not exists ( this .getArgument ( [ "branch" , "branch_name" ] ) ) or
0 commit comments