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 bdb369e
Showing
2 changed files
with
60 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,41 @@ | ||
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 | ||
certificatePassword: | ||
required: true | ||
|
||
jobs: | ||
call-pyxis-endpoint: | ||
name: Add Release Info | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Save Certificate | ||
# Note: This was the only way to write this file to disk (including the file type) | ||
# that curl in this GHA would recognize. Do not try to optimize and inline the | ||
# secret/env, or switch to another file type. | ||
env: | ||
CERTIFICATE: ${{ secrets.certificate }} | ||
run: | | ||
echo -n $CERTIFICATE | base64 -di > certificate.p12 | ||
- name: Call Pyxis API | ||
run: | | ||
curl --cert-type P12 --cert '${{ github.workspace }}/certificate.p12:${{ 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 |
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