Skip to content

Commit

Permalink
try fixing the environment variables from the github context
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRobertIn committed Nov 2, 2023
1 parent 95a4207 commit 6183ced
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .acimov/profile_check/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

CORESE_LOCAL_PATH = abspath(f"{PWD_TO_PROFILE_CHECK}{CORESE_JAR_NAME}")

IS_GITHUB_ACTIONS = not environ.get("GITHUB_SERVER_URL") is None
IS_GITHUB_ACTIONS = not environ.get("github.server_url") is None

# The reository URI

Expand All @@ -44,7 +44,7 @@
)\
.decode('utf-8')\
.strip() if not IS_GITHUB_ACTIONS else \
f"{environ.get('GITHUB_SERVER_URL')}/{environ.get('GITHUB_REPOSITORY')}"
f"{environ.get('github.server_url')}/{environ.get('github.repository')}"

# Base reporitory platform URL
PLATFORM_URL = "/".join(REPO_URI.split("/")[:-2])
Expand All @@ -55,7 +55,7 @@
)\
.decode('utf-8')\
.strip() if not IS_GITHUB_ACTIONS else \
environ.get("GITHUB_REF_NAME")
environ.get("github.ref_name")

# The relative path from root to the profile_test folder
PATH_TO_PROFILE_FOLDER = relpath(".", ROOT_FOLDER)
Expand All @@ -73,7 +73,7 @@
)\
.decode('utf-8')\
.strip() if not IS_GITHUB_ACTIONS else \
environ.get("GITHUB_ACTOR")
environ.get("github.actor")

# Format of a syntax error in the console
AST_ERROR_FORMAT = regex_compile("ERROR fr\\.inria\\.corese\\.sparql\\.triple\\.parser\\.ASTQuery")
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fragments-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
git config --global user.name "Github Actions"
git add .acimov/profile_check/output/actions.ttl -f
git commit -m "Provide automatic model test report"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ GITHUB_SERVER_URL }}
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.server_url }}
git push

0 comments on commit 6183ced

Please sign in to comment.