File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1
1
description : Runs the process of adding or updating a comment in a GitHub issue or pull request.
2
2
inputs :
3
+ action_ref :
4
+ default : ${{ github.action_ref }}
3
5
anchor :
4
6
description : The anchor for the command.
5
7
required : true
26
28
with :
27
29
swift-version : 5.10.0
28
30
- name : Create Mintfile
29
- run : echo Wei18/GitHubSwiftActions@${{ github .action_ref }} > ${{ github.action_path }}/Mintfile
31
+ run : echo Wei18/GitHubSwiftActions@${{ inputs .action_ref }} > ${{ github.action_path }}/Mintfile
30
32
shell : bash
31
33
- name : Setup Mint
32
34
uses : irgaly/setup-mint@v1
35
37
mint-directory : ${{ github.action_path }}
36
38
mint-executable-directory : ~/.mint/bin
37
39
- env :
40
+ ACTION_REF : ${{ inputs.action_ref }}
38
41
ANCHOR : ${{ inputs.anchor }}
39
42
BODY : ${{ inputs.body }}
40
43
NUMBER : ${{ inputs.number }}
Original file line number Diff line number Diff line change 1
1
description : Runs the process of creating GitHub Release with bump type and git ref
2
2
inputs :
3
+ action_ref :
4
+ default : ${{ github.action_ref }}
3
5
owner :
4
6
description : The owner for the command.
5
7
required : true
23
25
with :
24
26
swift-version : 5.10.0
25
27
- name : Create Mintfile
26
- run : echo Wei18/GitHubSwiftActions@${{ github .action_ref }} > ${{ github.action_path }}/Mintfile
28
+ run : echo Wei18/GitHubSwiftActions@${{ inputs .action_ref }} > ${{ github.action_path }}/Mintfile
27
29
shell : bash
28
30
- name : Setup Mint
29
31
uses : irgaly/setup-mint@v1
32
34
mint-directory : ${{ github.action_path }}
33
35
mint-executable-directory : ~/.mint/bin
34
36
- env :
37
+ ACTION_REF : ${{ inputs.action_ref }}
35
38
OWNER : ${{ inputs.owner }}
36
39
REF : ${{ inputs.ref }}
37
40
REPO : ${{ inputs.repo }}
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ struct CLIYamlBuilder {
32
32
]
33
33
}
34
34
35
+ inputs. merge ( SetUpActionBuilder ( ) . buildInputs ( ) ) { _, new in new }
36
+
35
37
let envDict = inputs. keys. reduce ( into: [ : ] ) { partialResult, value in
36
38
partialResult [ value. uppercased ( ) ] = " ${{ inputs. \( value) }} "
37
39
}
@@ -46,7 +48,7 @@ struct CLIYamlBuilder {
46
48
" inputs " : inputs,
47
49
" runs " : [
48
50
" using " : " composite " ,
49
- " steps " : SetUpActionBuilder ( ) . build ( ) + [
51
+ " steps " : SetUpActionBuilder ( ) . buildSteps ( ) + [
50
52
[
51
53
" name " : " Run \( name) " ,
52
54
" run " : " ~/.mint/bin/mint run \( repo) \( name) " ,
@@ -63,8 +65,18 @@ struct CLIYamlBuilder {
63
65
}
64
66
65
67
private struct SetUpActionBuilder {
66
- func build( ) -> [ [ String : Any ] ] {
67
- let content = " \( SwiftPackageConfig . current. repo) @${{ github.action_ref }} "
68
+
69
+ /// Workaround: https://github.com/actions/runner/issues/2473#issuecomment-1776051383/
70
+ func buildInputs( ) -> [ String : Any ] {
71
+ return [
72
+ " action_ref " : [
73
+ " default " : " ${{ github.action_ref }} "
74
+ ]
75
+ ]
76
+ }
77
+
78
+ func buildSteps( ) -> [ [ String : Any ] ] {
79
+ let content = " \( SwiftPackageConfig . current. repo) @${{ inputs.action_ref }} "
68
80
let action : [ [ String : Any ] ] = [
69
81
[
70
82
" name " : " Setup Swift " ,
You can’t perform that action at this time.
0 commit comments