-
Notifications
You must be signed in to change notification settings - Fork 15
94 lines (90 loc) · 2.65 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Create branches with automatic 0watch updates
name: Update
on:
workflow_dispatch: {}
schedule:
- cron: '0 2 * * *'
jobs:
windows:
runs-on: windows-latest
steps:
- name: Set up directory structure
uses: 0install/apps/.github/actions/setup@master
- name: Run 0watch
env:
GITHUB_TOKEN: ${{github.token}}
run: feeds\watch.ps1
- name: Upload generated feeds
if: always()
uses: actions/upload-artifact@v3
with:
name: windows-feeds
path: incoming
macos:
runs-on: macos-latest
steps:
- name: Set up directory structure
uses: 0install/apps/.github/actions/setup@master
- name: Run 0watch
env:
GITHUB_TOKEN: ${{github.token}}
run: feeds/watch.sh
- name: Upload generated feeds
if: always()
uses: actions/upload-artifact@v3
with:
name: macos-feeds
path: incoming
linux:
runs-on: ubuntu-latest
steps:
- name: Set up directory structure
uses: 0install/apps/.github/actions/setup@master
- name: Run 0watch
env:
GITHUB_TOKEN: ${{github.token}}
run: |
sudo apt-get -qq install python3-gnupg
feeds/watch.sh
- name: Upload generated feeds
if: always()
uses: actions/upload-artifact@v3
with:
name: linux-feeds
path: incoming
merge:
runs-on: ubuntu-latest
needs: [windows, macos, linux]
steps:
- name: Set up directory structure
uses: 0install/apps/.github/actions/setup@master
- name: Download feeds generated on Windows
uses: actions/download-artifact@v3
with:
name: windows-feeds
path: incoming
- name: Download feeds generated on MacOS
uses: actions/download-artifact@v3
with:
name: macos-feeds
path: incoming
- name: Download feeds generated on Linux
uses: actions/download-artifact@v3
with:
name: linux-feeds
path: incoming
- name: Check if there are new feeds
id: new-feeds
run: if ls incoming/*.xml; then echo "found=true" >> $GITHUB_OUTPUT; fi
- name: Run 0repo
uses: 0install/apps/.github/actions/0repo@master
if: steps.new-feeds.outputs.found
- name: Create Pull Request
if: steps.new-feeds.outputs.found
uses: peter-evans/create-pull-request@v5
with:
token: ${{github.token}}
path: feeds
branch: automatic-updates
title: Automatic updates
body: Automatic updates generated by 0watch scripts