relaton / support

Internal repository support for Relaton
0 stars 0 forks source link

Access token usage #6

Closed andrew2net closed 1 year ago

andrew2net commented 1 year ago

The relaton/relaton-data-bipm repo needs to clone relaton/rawdata-bipm-metrologia private repo. We need to use an access token to clone the repo. I've tried to set an environment variable:

env:
  RELATON_CI_PAT: ${{ secrets.RELATON_CI_PAT }}
jobs:
  uses: relaton/support/.github/workflows/crawler.yml@master

and use it in the crawler.rb script:

system('git clone https://$RELATON_CI_PAT@github.com/relaton/rawdata-bipm-metrologia rawdata-bipm-metrologia')

but without success. The access token works if it's used in a checkout action:

    - uses: actions/checkout@v2
      with:
        repository: relaton/rawdata-bipm-metrologia
        token: ${{ secrets.RELATON_CI_PAT }}
        path: rawdata-bipm-metrologia

but it seems impossible to use another action in one job with the reusable workflow. Any suggestions?

CAMOBAP commented 1 year ago

Fixed in https://github.com/relaton/relaton-data-bipm/pull/30