Enhanced workflow with environment variables
Some checks failed
/ chores (push) Failing after 13s

Introduced a set of environment variables in the CI workflow
configuration to align with the chores script's requirements. The
workflow now passes explicit values for necessary variables, matching
the environment variable name changes in the chores script for
consistency and clarity. Ensured correct token usage by updating TO
token reference. This change facilitates better configuration management
and error handling in automated tasks.
This commit is contained in:
Kumi 2024-02-18 13:13:51 +01:00
parent bae80c59fe
commit 1d8f8c63df
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 10 additions and 2 deletions

View file

@ -4,6 +4,14 @@ on: [push]
jobs: jobs:
chores: chores:
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
FORGEJO_URL: ${{ FORGEJO_URL }}
CHORES_ASSIGNEES: ${{ CHORES_ASSIGNEES }}
CHORES_REPO_OWNER: ${{ CHORES_REPO_OWNER }}
CHORES_REPO_NAME: ${{ CHORES_REPO_NAME }}
CHORES_EXPIRY_DAYS: ${{ CHORES_EXPIRY_DAYS }}
CHORES_TEXT: ${{ CHORES_TEXT }}
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v4 uses: actions/checkout@v4

View file

@ -10,9 +10,9 @@ from datetime import datetime, timedelta
FORGEJO_URL = os.environ.get("FORGEJO_URL", "https://git.private.coffee") FORGEJO_URL = os.environ.get("FORGEJO_URL", "https://git.private.coffee")
try: try:
TOKEN = os.environ["PIPELINES_TOKEN"] TOKEN = os.environ["FORGEJO_TOKEN"]
except KeyError: except KeyError:
logging.error("PIPELINES_TOKEN environment variable is required") logging.error("FORGEJO_TOKEN environment variable is required")
exit(1) exit(1)
ASSIGNEES = os.environ.get("CHORES_ASSIGNEES", "").split() ASSIGNEES = os.environ.get("CHORES_ASSIGNEES", "").split()