Add new workflow steps
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
Gitea Actions Demo / Run-Python-Script (push) Failing after 2s

This commit is contained in:
moritzrfs
2025-05-04 17:47:05 +02:00
parent 73c34f6c2e
commit d70695d776
2 changed files with 32 additions and 9 deletions

View File

@@ -19,16 +19,32 @@ jobs:
- run: echo "🍏 This job's status is ${{ job.status }}."
- run: echo "Ok, let's go!"
Explore-Own-Steps:
Run-Python-Script:
runs-on: ubuntu-latest
steps:
- name: Show custom variable
run: echo "The URL is ${{ vars.ADGUARD_URL }}"
- name: Check out repository
- name: Check out repository code
uses: actions/checkout@v4
- name: Run Python script from file
run: python3 test.py
# load vars and secrets from Gitea
- name: Load config vars
env:
ADGUARD_URL: ${{ vars.ADGUARD_URL }}
ADGUARD_URL: ${{ vars.ADGUARD_URL }}
ADGUARD_USER: ${{ vars.ADGUARD_USER }}
ADGUARD_PASSWORD: ${{ secrets.ADGUARD_PASSWORD }}
YAML_FILE: ${{ vars.YAML_FILE }}
run: |
echo "Exporting config vars..."
echo "URL: $ADGUARD_URL"
echo "User: $ADGUARD_USER"
echo "YAML_FILE: $YAML_FILE"
# install required Python packages from requirements.txt
- name: Install required Python packages
run: |
echo "Installing required Python packages..."
pip install -r requirements.txt
# run the Python script
# - name: Run the Python script
# run: |
# echo "Running the Python script..."
# python3 main.py

7
requirements.txt Normal file
View File

@@ -0,0 +1,7 @@
certifi==2025.4.26
charset-normalizer==3.4.2
idna==3.10
python-dotenv==1.1.0
PyYAML==6.0.2
requests==2.32.3
urllib3==2.4.0