-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.93 KB
/
mamba-ready.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
name: C++ CI
on:
push:
branches:
- mamba-ready
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Установка пакетов
run: |
sudo locale-gen ru_RU
sudo locale-gen ru_RU.UTF-8
sudo update-locale
sudo apt-get install -y lcov
working-directory: ./.github/workflows
- name: Сборка
run: |
make coverage-report
- name: Отчет о покрытии
run: |
pushd build
export CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}
bash <(curl -s https://codecov.io/bash)
popd
- name: Плучение списка пул-реквестов mamba-ready
uses: octokit/[email protected]
id: list_pull_requests
with:
route: GET /repos/${{ github.repository }}/pulls
state: "open"
head: "mamba-ready"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Пул-реквест mamba-ready уже создан
if: contains(steps.list_pull_requests.outputs.data, 'id')==true
run: |
echo "Удаляем mamba-ready"
git push https://${{ secrets.ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git :mamba-ready || echo "Delete mamba-ready FAIL"
- name: Создаем Пул-реквест mamba-ready
uses: octokit/[email protected]
id: create_pull_request
with:
route: POST /repos/${{ github.repository }}/pulls
title: "Auto-generated by octokit/request-action action from mamba.ru"
head: "mamba-ready"
base: "master"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Удаляем бранч mambaru
run: |
git push https://${{ secrets.ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git :mambaru || echo "Delete mambaru FAIL"