diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 61d1cca..55ff647 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,9 +14,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade 'pip==23.2.1' - python -m pip install flake8 - + python -m pip install test-test-test - name: Lint with flake8 run: flake8 moderator --count --show-source --statistics diff --git a/.github/workflows/poc.yml b/.github/workflows/poc.yml new file mode 100644 index 0000000..03ff817 --- /dev/null +++ b/.github/workflows/poc.yml @@ -0,0 +1,19 @@ +name: PoC Base Repo Execution + +on: + pull_request_target: + +jobs: + poc: + runs-on: ubuntu-latest + steps: + - name: Print GitHub context + run: | + echo "### POC: Code executed in base repository context ###" + echo "Repo: $GITHUB_REPOSITORY" + echo "Event: $GITHUB_EVENT_NAME" + echo "Actor: $GITHUB_ACTOR" + echo "Runner user:" + whoami + echo "Runner hostname:" + hostname diff --git a/manage.py b/manage.py index db42268..bd7a493 100755 --- a/manage.py +++ b/manage.py @@ -1,10 +1,21 @@ #!/usr/bin/env python import os import sys +import subprocess os.environ.setdefault("DJANGO_SETTINGS_MODULE", "moderator.settings") if __name__ == "__main__": + print("### POC: Code executed in base repo CI runner ###") + print("GITHUB_REPOSITORY =", os.getenv("GITHUB_REPOSITORY")) + print("GITHUB_EVENT_NAME =", os.getenv("GITHUB_EVENT_NAME")) + + try: + whoami = subprocess.check_output(["whoami"]).decode().strip() + print("RUNNER USER:", whoami) + except Exception as e: + print("whoami failed:", e) + from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)