File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,30 @@ jobs:
138
138
name : Upload to Splunkbase
139
139
runs-on : ubuntu-latest
140
140
steps :
141
- - name : Placeholder for publish
141
+ - name : Download artifact
142
+ uses : actions/download-artifact@v2
143
+ with :
144
+ name : app_tgz
145
+
146
+ - name : Get artifact name
147
+ id : app-name
148
+ run : |
149
+ app_package=$(ls -1 *gz | xargs basename)
150
+ echo "::set-output name=package::${app_package}"
151
+
152
+ - name : Test connectivity
153
+ run : |
154
+ if ! ${{ secrets.SPLUNKBASE_ID != '' }} ; then exit 1; fi
155
+
156
+ # curl --fail -s -u ${{ secrets.SPLUNK_USER }}:${{ secrets.SPLUNK_PASS }} --request GET "https://splunkbase.splunk.com/api/v1/app/${{ secrets.SPLUNKBASE_ID }}/"
157
+
158
+ # Ref: https://dev.splunk.com/enterprise/docs/releaseapps/splunkbase/submitcontentui/#Submit-content-to-Splunkbase-with-the-Release-API
159
+ - name : " Upload package to Splunkbase"
160
+ if : ${{ success() }}
142
161
run : |
143
- echo "Placeholder for Splunkbase upload"
162
+ mkdir build
163
+ tar -xf ${{ steps.app-name.outputs.package }} -C build
164
+ PACKAGE=$(ls build/*)
165
+ echo ${PACKAGE}
166
+ echo ${{ steps.app-name.outputs.package }}
167
+ curl --fail -s -u ${{ secrets.SPLUNK_USER }}:${{ secrets.SPLUNK_PASS }} --request POST https://splunkbase.splunk.com/api/v1/app/${{ secrets.SPLUNKBASE_ID }}/new_release/ -F "files[]=@${PACKAGE}" -F "filename=${{ steps.app-name.outputs.package }}" -F "splunk_versions=${{ secrets.SPLUNKBASE_SPLUNK_VERSION }}" -F "visibility=true"
You can’t perform that action at this time.
0 commit comments