forked from redhat-openshift-ecosystem/openshift-preflight
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding new release action to send release information to pyxis
Signed-off-by: Adam D. Cornett <[email protected]>
- Loading branch information
1 parent
0670106
commit 137d301
Showing
2 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Add Release Info to Pyxis | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
tag: | ||
required: true | ||
type: string | ||
commit: | ||
required: true | ||
type: string | ||
host: | ||
required: true | ||
type: string | ||
secrets: | ||
certificate: | ||
required: true | ||
key: | ||
required: true | ||
certificatePassword: | ||
required: true | ||
|
||
jobs: | ||
call-pyxis-endpoint: | ||
name: Add Release Info | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Save Certificate and Key | ||
run: | | ||
echo -en "${{ secrets.certificate }}" > /tmp/preflight-release.crt | ||
echo -en "${{ secrets.key }}" > /tmp/preflight-release.key | ||
- name: Call Pyxis API | ||
run: | | ||
curl -s \ | ||
--cert '/tmp/preflight-release.crt \ | ||
--key '/tmp/preflight-release.key' \ | ||
--pass '${{ secrets.certificatePassword }}' \ | ||
-H 'Content-Type: application/json' \ | ||
-d '{"commit":"${{ inputs.commit }}","enabled_for_testing":true,"name":"github.com/redhat-openshift-ecosystem/openshift-preflight","version":"${{ inputs.tag }}"}' \ | ||
-X POST \ | ||
'https://${{ inputs.host }}/v1/tools' | jq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters