Update check-for-updates.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check for updates | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'main.py' | ||
- '.github/workflows/check-for-updates.yml' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'main.py' | ||
- '.github/workflows/check-for-updates.yml' | ||
permissions: | ||
contents: write | ||
issues: write | ||
jobs: | ||
dict: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
- name: Install uv | ||
uses: astral-sh/[email protected] | ||
with: | ||
version: "latest" | ||
- name: Run script | ||
id: script | ||
run: uv run main.py >> $GITHUB_OUTPUT | ||
- name: Create issue if updated | ||
if: ${{ startsWith(${{ steps.script.outputs.stdout }}, "yes") }} | ||
Check failure on line 42 in .github/workflows/check-for-updates.yml GitHub Actions / Check for updatesInvalid workflow file
|
||
run: echo "TODO create issue" | ||
- name: Commit changes | ||
if: ${{ !contains(fromJSON('["push", "pull_request"]'), github.event_name) }} # commit changes only if scheduled | ||
uses: EndBug/[email protected] | ||
with: | ||
message: "Update last_update.json" | ||
add: last_update.json | ||
author_name: github-actions[bot] | ||
author_email: 41898282+github-actions[bot]@users.noreply.github.com |