Uploads a file via HTTP POST using the form-data package.
Required. Host of the HTTP server (e.g. example.com).
Required. Path of the URL to send the file (e.g. /postFile).
Required. Full path of the local file you want to upload (e.g. /home/user/file.zip).
Optional. Type true
whether your request must go on HTTPS. Default false
.
Optional. Additional data you should want to send within the request (e.g. '{"foo":"bar"}').
The response from the server.
on: pull_request
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Exports the full file path
id: file
run: echo "::set-output name=path::$(realpath relative/path/to.file)"
- uses: leandro-hermes/[email protected]
with:
host: 'example.com'
path: '/postFile'
filePath: ${{ steps.file.outputs.path }}
data: ${{ toJson(github.event.pull_request) }}