Fix synthpops checkout to remove hardcoding of amath-idm owner, and instead attempt checkout from a synthpops repo under the same owner at this repo
@@ -11,19 +11,21 @@ jobs:
python-version: [ '3.7' ]
name: Install and test
steps:
- - name: testing
- run: echo $GITHUB_ACTOR - $GITHUB_REPOSITORY
+ - name: Set repo owner env variable
+ shell: python
+ run: print("::set-env name=GITHUB_OWNER::{}".format('${{github.repository}}'.split('/')[0]))
- name: Checkout sources
uses: actions/checkout@v1
- name: Checkout synthpops
uses: actions/checkout@v2
with:
- repository: amath-idm/synthpops
+ repository: ${{ env.GITHUB_OWNER }}/synthpops
# Checking out a private repo requires a Personal Access Token (PAT). To create one, follow the instructions at:
# https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line#creating-a-token
- # The (service?) account creating the PAT needs to have access to the private repo, and the PAT should be scoped to "repo".
+ # The account creating the PAT needs to have access to the private repo, and the PAT should be scoped to "repo".
# To add the PAT as a Secret, usable by this workflow, follow the instructions at:
# https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets
+ # NOTE: The secret must be named "GitHub_PAT"
token: ${{ secrets.GitHub_PAT }}
path: ./synthpops
- uses: actions/setup-python@master
