Skip to content

colapsis/transfa-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

transfa

uses: colapsis/transfa-action@v1 node20 MIT

Upload any file to transfa.sh (or your own self-hosted instance) from a GitHub Actions workflow and get back a shareable Agent Link and Human Link.


Quick start

- uses: colapsis/transfa-action@v1
  id: upload
  with:
    file: ./dist/report.pdf
    api-key: ${{ secrets.TRANSFA_API_KEY }}

- run: echo "Download → ${{ steps.upload.outputs.agent-link }}"

Inputs

Input Required Default Description
file yes Path to the file to upload, relative to the workspace root
api-key yes Your transfa.sh API key — store it as a repository secret
expires no 7d Link TTL: 1h, 24h, 7d, 30d
name no (filename) Override the filename shown to recipients
max-downloads no (unlimited) Lock the link after N downloads
password no (none) Password-protect the download link
base-url no https://transfa.sh Base URL for self-hosted instances

Outputs

Output Description
id Upload ID
agent-link Direct download URL — use this in scripts, agents, and CI
human-link Share page URL — use this in PRs, Slack messages, and emails
sha256 SHA-256 hash of the uploaded file
expires-at ISO 8601 expiry timestamp

Examples

1. Basic upload and post link to PR summary

name: Build and share artifact

on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Build
        run: npm run build

      - uses: colapsis/transfa-action@v1
        id: upload
        with:
          file: ./dist/bundle.zip
          api-key: ${{ secrets.TRANSFA_API_KEY }}

      - name: Post to PR summary
        run: |
          echo "## Build artifact" >> $GITHUB_STEP_SUMMARY
          echo "" >> $GITHUB_STEP_SUMMARY
          echo "**Download:** ${{ steps.upload.outputs.agent-link }}" >> $GITHUB_STEP_SUMMARY
          echo "**Share:** ${{ steps.upload.outputs.human-link }}" >> $GITHUB_STEP_SUMMARY
          echo "**SHA-256:** \`${{ steps.upload.outputs.sha256 }}\`" >> $GITHUB_STEP_SUMMARY
          echo "**Expires:** ${{ steps.upload.outputs.expires-at }}" >> $GITHUB_STEP_SUMMARY

2. Upload test coverage report on push to main

name: CI

on:
  push:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run tests with coverage
        run: npm test -- --coverage

      - uses: colapsis/transfa-action@v1
        id: coverage
        with:
          file: ./coverage/lcov-report.zip
          api-key: ${{ secrets.TRANSFA_API_KEY }}
          expires: 30d
          name: coverage-${{ github.sha }}.zip

      - name: Annotate commit
        run: |
          echo "Coverage report: ${{ steps.coverage.outputs.human-link }}" >> $GITHUB_STEP_SUMMARY

3. Upload with password and single-download limit

- uses: colapsis/transfa-action@v1
  id: upload
  with:
    file: ./secrets/private-keys.zip
    api-key: ${{ secrets.TRANSFA_API_KEY }}
    password: ${{ secrets.ARTIFACT_PASSWORD }}
    max-downloads: 1
    expires: 1h

- name: Send secure link
  run: echo "One-time link (password protected): ${{ steps.upload.outputs.human-link }}"

4. Self-hosted instance

- uses: colapsis/transfa-action@v1
  id: upload
  with:
    file: ./dist/app.tar.gz
    api-key: ${{ secrets.TRANSFA_API_KEY }}
    base-url: https://files.your-company.internal
    expires: 24h

Self-hosted

Point the action at any transfa-compatible server with base-url. The action will upload to ${base-url}/api/upload using the same multipart API.

with:
  base-url: https://files.your-company.internal

See colapsis/transfa for Docker and Helm self-hosting instructions.


License

MIT


powered by transfa.sh

About

GitHub Action to upload files to Transfa

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors