From 82b4096d539ee4a59f75d84700596af6ec241b31 Mon Sep 17 00:00:00 2001 From: Phillip Tarrant Date: Mon, 26 Jan 2026 15:10:52 -0600 Subject: [PATCH] testing bash mode for workflow --- .gitea/workflows/weather-alerts.yml | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/weather-alerts.yml b/.gitea/workflows/weather-alerts.yml index f968a00..b165847 100644 --- a/.gitea/workflows/weather-alerts.yml +++ b/.gitea/workflows/weather-alerts.yml @@ -9,28 +9,34 @@ jobs: check-weather: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Install Python + run: | + apt-get update + apt-get install -y python3 python3-pip python3-venv git - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - cache: 'pip' + - name: Checkout repository + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + SERVER_URL: ${{ github.server_url }} + REPOSITORY: ${{ github.repository }} + run: | + SERVER_HOST="${SERVER_URL#https://}" + SERVER_HOST="${SERVER_HOST#http://}" + git clone --depth 1 "https://oauth2:${GITEA_TOKEN}@${SERVER_HOST}/${REPOSITORY}.git" . + git config user.name "Gitea Actions" + git config user.email "actions@gitea.local" - name: Install dependencies - run: pip install -r requirements.txt + run: pip install --break-system-packages -r requirements.txt - name: Run weather alerts env: VISUALCROSSING_API_KEY: ${{ secrets.VISUALCROSSING_API_KEY }} NTFY_ACCESS_TOKEN: ${{ secrets.NTFY_ACCESS_TOKEN }} - run: python -m app.main + run: python3 -m app.main - name: Commit state changes run: | - git config user.name "Gitea Actions" - git config user.email "actions@gitea.local" git add data/state.json git diff --staged --quiet || git commit -m "chore: update weather alert state [skip ci]" git push