File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 60
60
type : boolean
61
61
description : " Boolean to enable running build in windows docker container. Defaults to true"
62
62
default : true
63
+ needs_token :
64
+ type : boolean
65
+ description : " Boolean to enable providing the GITHUB_TOKEN to downstream job."
66
+ default : false
63
67
64
68
jobs :
65
69
linux-build :
80
84
run : swift --version
81
85
- name : Checkout repository
82
86
uses : actions/checkout@v4
87
+ - name : Provide token
88
+ if : ${{ inputs.needs_token }}
89
+ run : |
90
+ echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
83
91
- name : Set environment variables
84
92
if : ${{ inputs.linux_env_vars }}
85
93
run : |
@@ -105,6 +113,10 @@ jobs:
105
113
steps :
106
114
- name : Checkout repository
107
115
uses : actions/checkout@v4
116
+ - name : Provide token
117
+ if : ${{ inputs.needs_token }}
118
+ run : |
119
+ echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
108
120
- name : Set environment variables
109
121
if : ${{ inputs.windows_env_vars }}
110
122
run : |
You can’t perform that action at this time.
0 commit comments