Skip to content

Extract and Upload Upbound Secrets #1

Extract and Upload Upbound Secrets

Extract and Upload Upbound Secrets #1

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"