-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.23 KB
/
ci_cd.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: CI & CD
on: [push, pull_request]
env:
MIRROR_URL: "[email protected]:EpitechPromo2026/B-FUN-500-TLS-5-2-glados-aurelien.masset.git"
jobs:
check_can_build:
name: Check build status using stack
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build project
shell: bash
run: |
stack build
exit $?
run_tests:
name: Run tests using stack test
needs: check_can_build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run stack test
shell: bash
run: |
stack test
exit $?
mirroring_to_github:
name: Mirror to Epitech's github repository
needs: run_tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Push commit/pull request
uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
${{ env.MIRROR_URL }}
ssh_private_key:
${{ secrets.SSH_PRIVATE_KEY }}