forked from asmigala/fedora-spec
-
Notifications
You must be signed in to change notification settings - Fork 7
53 lines (42 loc) · 1.55 KB
/
search-refresh.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
45
46
47
48
49
50
51
52
53
name: Refresh search data
on:
push:
branches: [ main, master ]
paths: '**.spec'
workflow_dispatch:
jobs:
Refresh-Search-Data:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out RPM SPEC files repository
uses: actions/checkout@v2
with:
path: fedora-spec
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Check out Python Scan script repository
uses: actions/checkout@v2
with:
repository: audinux/parse-spec
path: parse-spec
- name: Scan SPEC files and generate metadata
run: python parse-spec/main.py fedora-spec
- run: echo "TODO Test the ouput non-empty, valid json ..."
- run: mkdir output
- run: mv search-data.json output/
- name: Push the ouput to web site repo
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: output/
destination-repository-name: 'audinux.github.io'
destination-github-username: 'audinux'
target-directory: 'packages/data'
user-email: 'brunovern.a@gmail.com'
user-name: 'BrunoVernay'
commit-message: 'Search metadata update via GH Actions.'