Skip to content
Closed

poc #539

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 11 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -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)