-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.81 KB
/
Copy pathrun_script_trigger_builds.yml
File metadata and controls
64 lines (55 loc) · 1.81 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: build_and_trigger
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- LICENSE
pull_request:
branches:
- master
# schedule:
# - cron: "0 0 * * MON"
jobs:
pip:
runs-on: ubuntu-latest
strategy:
matrix:
container: ["ubuntu:18.04", "ubuntu:20.04"] # , "centos:7", "centos:8"
steps:
- uses: actions/checkout@v1
- name: Allow execute on script
run: chmod +x ansible_convenience_script.sh
- name: run pip container
run: |
docker run -d -it --name pip-container -v "$(pwd)":/home/script "${{ matrix.container }}"
docker exec pip-container /bin/bash -v /home/script/ansible_convenience_script.sh -p
pkg:
runs-on: ubuntu-latest
strategy:
matrix:
container: ["ubuntu:18.04", "ubuntu:20.04"] # , "centos:7", "centos:8"
steps:
- uses: actions/checkout@v1
- name: Allow execute on script
run: chmod +x ansible_convenience_script.sh
- name: run package manager container
run: |
docker run -d -it --name pkg-container -v "$(pwd)":/home/script "${{ matrix.container }}"
docker exec pkg-container /bin/bash -v /home/script/ansible_convenience_script.sh -P
trigger_docker_repo_dispatch:
# needs: [pip, pkg]
needs: pkg
runs-on: ubuntu-latest
strategy:
matrix:
repo: ["centos7", "centos8", "ubuntu18", "ubuntu20"] # "ubuntu16",
steps:
- name: Dispatch initiating repository event
run: |
curl -XPOST \
-u ${{ secrets.ACCESS_TOKEN }} \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" https://api.github.com/repos/dovry/docker_${{ matrix.repo }}_ansible/dispatches \
--data '{"event_type": "build_application"}'