Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize github actions #43

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,20 +1,59 @@
# .github/workflows/render_readme.yml
# .github/workflows/generate_and_render_readme.yml

name: Render new README based on tally updates
name: Generate and Render README

on:
pull_request:
branches:
- main
paths:
- DETECTION_RESULTS.tsv
- assets/positivity_tally.tsv
- .github/workflows/generate_tally.yml
- .github/workflows/generate_and_render_readme.yml
- .github/workflows/render_readme.yml
- scripts/splice_readme.py
- DETECTION_RESULTS.tsv

jobs:
generate-tally:
name: Generate Positivity Tally
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install Dependencies
run: |
pip install uv
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt

- name: Tally positive cartons per state
run: |
source .venv/bin/activate
python3 scripts/positivity_tally.py \
DETECTION_RESULTS.tsv \
assets/positivity_tally.tsv

- name: Commit positivity tally
if: success()
run: |
git config --global user.name 'GitHub Actions Bot'
git config --global user.email 'actions@github.com'
git add assets/positivity_tally.tsv
git fetch origin proposals
git commit -m "Updating positivity tally"
git push --force-with-lease origin HEAD:proposals
render-readme:
name: Render new README
needs: generate-tally
runs-on: ubuntu-latest

steps:
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/generate_tally.yml

This file was deleted.

Loading