Skip to content

Delete .github/workflows/python.yml #30

Delete .github/workflows/python.yml

Delete .github/workflows/python.yml #30

Workflow file for this run

name: Trigger Workflow and Complete Job
on:
push:
branches:
- main
workflow_dispatch:
jobs:
trigger-workflow:
runs-on: ubuntu-latest
timeout-minutes: 5 # Overall timeout for this job
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run workflow trigger script
id: trigger
env:
TOKEN: ${{ secrets.TOKEN }}
REPO_OWNER: ${{ secrets.REPO_OWNER }}
REPO_NAME: ${{ secrets.REPO_NAME }}
WORKFLOW_ID: ${{ secrets.WORKFLOW_ID }}
run: |
python Main.py
if [ $? -eq 0 ]; then
echo "Workflow triggered successfully!"
echo "TRIGGERED=true" >> $GITHUB_ENV
else
echo "Failed to trigger workflow."
exit 1
fi
complete-job:
runs-on: ubuntu-latest
needs: trigger-workflow
if: env.TRIGGERED == 'true'

Check failure on line 46 in .github/workflows/python-app.yml

View workflow run for this annotation

GitHub Actions / Trigger Workflow and Complete Job

Invalid workflow file

The workflow is not valid. .github/workflows/python-app.yml (Line: 46, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.TRIGGERED == 'true' .github/workflows/python-app.yml (Line: 57, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.TRIGGERED != 'true'
steps:
- name: Complete Job
run: |
echo "Trigger was successful. Completing the job."
exit 0 # Exit with code 0 to mark the job as successful
# Optional: Handle failure if trigger fails
handle-failure:
runs-on: ubuntu-latest
needs: trigger-workflow
if: env.TRIGGERED != 'true'
steps:
- name: Handle Failure
run: |
echo "Trigger failed. Taking necessary actions."
exit 1 # Exit with code 1 to indicate failure