-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.21 KB
/
post.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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'