-
Notifications
You must be signed in to change notification settings - Fork 29
45 lines (41 loc) · 1.27 KB
/
publish.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
42
43
44
name: Publish
on:
workflow_dispatch:
schedule:
# Times are UTC
# This needs to run AFTER the Astrerisk CreateDocs job has run.
- cron: '0 05 * * *'
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.x
cache: 'pip'
- run: pip install -r requirements.txt
- name: Get Token needed to push updates
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@v3
with:
application_id: ${{secrets.ASTERISK_ORG_ACCESS_APP_ID}}
application_private_key: ${{secrets.ASTERISK_ORG_ACCESS_APP_PRIV_KEY}}
organization: asterisk
- name: Publish
env:
GITHUB_TOKEN: ${{steps.get_workflow_token.outputs.token}}
GH_TOKEN: ${{steps.get_workflow_token.outputs.token}}
run: |
gh auth setup-git -h github.com
git config --global user.email "[email protected]"
git config --global user.name "Asterisk Development Team"
cat >Makefile.inc <<EOF
${{vars.MAKEFILE_INC}}
EOF
make
make deploy