Skip to content

Commit

Permalink
wrong envionment variables for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRobertIn committed Nov 2, 2023
1 parent 830bda3 commit 5d1504a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 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("context.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('context.server_url')}/{environ.get('context.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("context.branch")
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("context.developper")
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
8 changes: 1 addition & 7 deletions .github/workflows/fragments-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +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:${{ context.token }}@github.com/${{ context.repository }}
git remote set-url origin https://x-access-token:${{ GITHUB_TOKEN }}@github.com/${{ GITHUB_SERVER_URL }}
git push
env:
GITHUB_TOKEN: ${{ context.token }}
GITHUB_SERVER_URL: ${{ context.server_url }}
GITHUB_REPOSITORY: ${{ context.repository }}
GITHUB_REF_NAME: ${{ context.branch }}
GITHUB_ACTOR: ${{ context.developper }}

0 comments on commit 5d1504a

Please sign in to comment.