-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (39 loc) · 1.15 KB
/
build.yml
File metadata and controls
45 lines (39 loc) · 1.15 KB
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
45
name: build
on:
workflow_dispatch:
schedule:
- cron: "0 0/4 * * *"
push:
branches:
- main
jobs:
build:
if: github.repository_owner == 'autopkg'
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Clone this repository
uses: actions/checkout@v4
with:
path: main
token: ${{ secrets.PAT_SECRET }}
- name: Install Python dependencies
working-directory: main
run: pip3 install -r v1/requirements.txt
- name: Clone AutoPkg org repos and rebuild search index
working-directory: main
env:
PA_TOKEN: ${{ secrets.PAT_SECRET }}
run: |
mkdir -p repos
python3 v1/build.py && cp v1/index.json index.json
- name: Commit index
working-directory: main
env:
PA_TOKEN: ${{ secrets.PAT_SECRET }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add v1/index.json index.json || true
git commit -m "Rebuild index" v1/index.json index.json || true
git push --set-upstream origin main || true