Only use github.token on github.com

This expression evaluates to `''` if called from GHES hosted elsewhere
You can still provide your token on both github.com and GHES
This commit is contained in:
ChristopherHX 2022-06-27 10:16:03 +02:00 committed by GitHub
parent ffcd00020c
commit e6d4b8dcdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ inputs:
description: 'The target architecture (x86, x64) of the Python interpreter.'
token:
description: Used to pull python distributions from actions/python-versions. Since there's a default, this is typically not supplied by the user.
default: ${{ github.token }}
default: ${{ github.server_url == 'https://github.com' && github.token }}
cache-dependency-path:
description: 'Used to specify the path to dependency files. Supports wildcards or a list of file names for caching multiple dependencies.'
outputs: