-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (47 loc) · 1.32 KB
/
trigger-updates.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
name: Trigger update
on:
schedule:
- cron: '0 2 * * *'
push:
branches:
- develop
jobs:
main:
strategy:
matrix:
oc-version:
- 14
- 15
runs-on: ubuntu-latest
steps:
- name: Prepare git
run: |
git config --global user.name "Deployment Trigger"
git config --global user.email "[email protected]"
- name: Prepare GitHub SSH key
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
run: |
install -dm 700 ~/.ssh/
echo "${DEPLOY_KEY}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Clone repository
run: |
git clone [email protected]:opencast/opencast-rpmbuild.git
- name: Switch to release branch
working-directory: opencast-rpmbuild
run: |
git checkout r/${{ matrix.oc-version }}.x
- name: Update trigger
working-directory: opencast-rpmbuild
run: |
date > .trigger
- name: Commit trigger file
working-directory: opencast-rpmbuild
run: |
git commit .trigger -m "Trigger on $(date)"
- name: Push trigger
working-directory: opencast-rpmbuild
run: |
git push origin r/${{ matrix.oc-version }}.x