Skip to content

Set up your GitHub Actions workflow with a specific version of Tor

License

Notifications You must be signed in to change notification settings

tor-actions/setup-tor

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

setup-tor

Validate

This action sets up a tor environment for use in actions by:

  • optionally downloading and caching a version of Tor by version and adding to PATH
  • registering problem matchers for error output

Usage

See action.yml

Basic:

steps:
- uses: actions/checkout@main
- uses: tor-actions/setup-tor@main
  with:
    tor-version: '0.4.5.7' # The Tor version to download (if necessary) and use.
- run: tor

Matrix Testing:

jobs:
  build:
    runs-on: ubuntu-16.04
    strategy:
      matrix:
        tor: [ '0.4.5.7', '0.4.5-rc7' ]
    name: Tor ${{ matrix.tor }} sample
    steps:
      - uses: actions/checkout@v2
      - name: Setup tor
        uses: tor-actions/setup-tor@v1
        with:
          tor-version: ${{ matrix.tor }}
      - run: tor

Run as daemon and set specific port (default as 9050):

steps:
- uses: actions/checkout@main
- uses: tor-actions/setup-tor@main
  with:
    tor-version: '0.4.5.7' # The Tor version to download (if necessary) and use.
    daemon: true
    port: 12345

Run with a custom configuration file:

steps:
- uses: actions/checkout@main
- uses: tor-actions/setup-tor@main
  with:
    config-path: ${{ github.workspace }}/.github/.torrc

Run with a custom configuration:

steps:
- uses: actions/checkout@main
- uses: tor-actions/setup-tor@main
  with:
    config: |
      ControlPort 9051
      CookieAuthentication 0

License

The scripts and documentation in this project are released under the MIT License

Contributions

Contributions are welcome! See Contributor's Guide

Code of Conduct

👋 Be nice. See our code of conduct