From e6d4b8dcddcfc7624077300350a045a496201fe2 Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Mon, 27 Jun 2022 10:16:03 +0200 Subject: [PATCH] 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 --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 27474e2a..a6113b7b 100644 --- a/action.yml +++ b/action.yml @@ -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: