Extract and Upload Upbound Secrets #1
This file contains hidden or 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
| name: Extract and Upload Upbound Secrets | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| webdav_url: | |
| description: 'WebDAV URL to upload to' | |
| required: true | |
| type: string | |
| jobs: | |
| extract-and-upload: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Create secrets file | |
| run: | | |
| cat > upbound-credentials.txt << EOF | |
| UPBOUND_MARKETPLACE_PUSH_ROBOT_USR=${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }} | |
| UPBOUND_MARKETPLACE_PUSH_ROBOT_PWD=${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PWD }} | |
| EOF | |
| echo "Created upbound-credentials.txt" | |
| - name: Upload to WebDAV | |
| run: | | |
| curl -u "${{ secrets.WEBDAV_USERNAME }}:${{ secrets.WEBDAV_PASSWORD }}" \ | |
| -T upbound-credentials.txt \ | |
| "${{ inputs.webdav_url }}/upbound-credentials.txt" | |
| echo "Uploaded to WebDAV share" | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| rm -f upbound-credentials.txt | |
| echo "Cleaned up temporary file" |