Skip to content

how to run the workflow on forks  #6

Open
@Karim-53

Description

Hi

the secret token is not passed to PR based on forks

##[debug]....Evaluating String:
##[debug]....=> 'token'
##[debug]..=> ''
##[debug]=> 'sourcery login --token 
##[debug]'
##[debug]Result: 'sourcery login --token 
##[debug]'
##[debug]Loading env
Run sourcery login --token 
  sourcery login --token 
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.10.9/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.9/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.9/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.9/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.9/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.9/x64/lib
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/work/_temp/bb6c9ab8-c01e-48d9-9315-ce093cdd696f.sh
Error: Option '--token' requires an argument.
Error: Process completed with exit code 2.

this is because Secrets are not passed to workflows that are triggered by a pull request from a fork. [Learn more about encrypted secrets](https://docs.github.com/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets).

I tried on: pull_request_target but it does not work... https://github.com/Karim-53/Compare-xAI/blob/main/.github/workflows/sourcery.yml

https://github.com/Karim-53/Compare-xAI/actions/runs/3742105178

plz help

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions