Check repo owner ID instead of repo name

This commit is contained in:
Brendon Smith
2024-06-09 16:47:19 -04:00
parent a360fcb184
commit f51682fb52
2 changed files with 9 additions and 3 deletions
+5 -3
View File
@@ -8,16 +8,18 @@ REQUIRED = 'required'
EVENT = os.environ['EVENT']
REF = os.environ['REF']
REPO = os.environ['REPO']
REPO_OWNER_ID = os.environ['REPO_OWNER_ID']
REPO_OWNER_ID_PYPA = '647025'
def set_image(event: str, ref: str, repo: str) -> str:
if event == 'pull_request' and 'gh-action-pypi-publish' in repo:
def set_image(event: str, ref: str, repo: str, repo_owner_id: str) -> str:
if event == 'pull_request' and repo_owner_id == REPO_OWNER_ID_PYPA:
return '../../../Dockerfile'
docker_ref = ref.replace('/', '-')
return f'docker://ghcr.io/{repo}:{docker_ref}'
image = set_image(EVENT, REF, REPO)
image = set_image(EVENT, REF, REPO, REPO_OWNER_ID)
action = {
'name': '🏃',