-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.11 KB
/
update.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
name: Update stickers
on:
schedule:
- cron: "2 0 * * *"
push:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
submodules: recursive
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
allow-prereleases: true
- name: Update stickers
env:
SIGNAL_PASSWORD: ${{ secrets.SIGNAL_PASSWORD }}
SIGNAL_UUID: ${{ secrets.SIGNAL_UUID }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_USERID: ${{ secrets.TELEGRAM_USERID }}
run: |
pip install -r requirements.txt
python update.py
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: Update stickers
branch: ${{ steps.extract_branch.outputs.branch }}