Post new formula and casks #1289
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: Post new formula and casks | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */3 * * *' | |
jobs: | |
post: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Configure Python with cache | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'poetry' | |
- name: Install dependencies | |
run: poetry install | |
- name: Add venv bin to PATH | |
run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH | |
- name: Run bot script | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
LOG_LEVEL: ${{ vars.LOG_LEVEL }} | |
MAX_TOOTS_PER_EXECUTION: ${{ vars.MAX_TOOTS_PER_EXECUTION }} | |
MASTODON_API_BASE_URL: ${{ vars.MASTODON_API_BASE_URL }} | |
MASTODON_CLIENT_SECRET: ${{ secrets.MASTODON_CLIENT_SECRET }} | |
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
run: poetry run python3 post.py | |
- name: Commit changes to state directory | |
if: ${{ always() }} | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: 'state' | |
message: 'Updated state from last workflow run' |