Skip to main content

Copy File to Runner Storage

Copies a file from Blink’s execution storage to the storage bucket configured for the runner executing the workflow, making it available to subsequent steps on that runner. Use this action when your workflow receives a file input and runs on a self-hosted runner with custom storage. File inputs are initially saved in Blink’s execution storage bucket, but the runner looks for files in your configured bucket. If the file has not been copied to that bucket, steps that try to access it fail with a file not found error. Add this action before any steps that need to access the file, and run it on the same runner as those steps.
This action uses Download File From URL to copy the file and returns that action’s output.
Create Archive

Create Archive

Create an archive from a file or folder path and set an identifier for it so it can be used as input in subsequent steps.
Create Archive

Create Working Directory

The “Create Working Directory” action establishes a dedicated filesystem state that preserves files and changes across different steps in the workflow, allowing them to persist and ensuring continuity between steps.
Create Working Directory

Download File From URL

Download a file from a URL and set an identifier for it, so it can be used as input in subsequent steps.
Download File

Get File Content

The Get File Content utility action allows you to print the content of a file that exists in a working directory.

Set File Variable

Set an identifier for a file on the file system so it can be used as input in subsequent Steps.
The Working Directory created in step 1 needs to be entered into the input fields for both the ‘Run Bash’ action in step 2 and the ‘Set File Variable’ action in step 3. This ensures that both actions operate within the same directory, maintaining consistency across the workflow.
Step 1: Create Working Directory
  1. Add a “Create Working Directory” action to the workflow.
  2. Set the Name parameter to "WorkingDirectory".
Step 2: Run Bash Script
  1. Add a “Run Bash Script” action.
  2. Create a bash script For example: echo $(getent passwd) > users
    • This command retrieves a list of system users and writes it to a file named users.
  3. Under the Advanced section, set Working Directory to {{ WorkingDirectory.Identifier }} using the variable picker to ensure the script executes within the created directory.
Step 3: Set File Variable
  1. Add a “Set File Variable” action.
  2. Configure the following parameters:
    • File Identifier: "MyFile"
    • Path: "users"
  3. Under the Advanced section, set Working Directory to {{ WorkingDirectory.Identifier }} using the variable picker.
  4. Execute the step. The output confirms the file’s location and size:
Set File Var

When Do You Need a Working Directory?

A Working Directory preserves files and changes between workflow steps configured to use that directory. Whether you need one depends on how the file is created and how you plan to use it:
  • The file is created by a script, such as Bash or Python: Select the same Working Directory in both the script step and Set File Variable. This allows Set File Variable to locate the file created by the script and make it available to subsequent steps.
  • The file is uploaded through a web form or a File input parameter: The uploaded file is already available as a file variable, so you do not need a working directory or Set File Variable to access it. Reference its path using {{get_file("<parameter name>").path}}. For more information, see Files uploaded through input parameters and web forms.
  • A script processes an uploaded file and creates a new output file: Create a working directory, select it in the script step, and save the output file there. Then use Set File Variable with the same working directory to make the output file available to subsequent steps.