forked from commaai/openpilot
-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (58 loc) · 1.71 KB
/
Copy pathci_release.yaml
File metadata and controls
59 lines (58 loc) · 1.71 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
name: CI Release
on:
push:
branches-ignore:
- 'testing-closet*'
paths-ignore:
- '**.md'
- 'README*'
workflow_dispatch:
jobs:
ci_release:
name: github ci release
runs-on: ubuntu-20.04
timeout-minutes: 90
env:
TARGET_DIR: tmp_op_ci
steps:
- uses: actions/checkout@v2
with:
submodules: true
lfs: true
- name: Prepare CI Env Vars
run: |
chmod +x ./.github/scripts/ci_env_vars.sh
source ./.github/scripts/ci_env_vars.sh
- name: Stop for non-default repo
if: ${{ !env.IS_DEFAULT_REPO }}
run: |
echo "::error file=prebuilt.yaml::Prebuilts are only release from the default repo."
exit 1
- name: Setup Build Branch
run: |
if [[ $IS_MAIN_BRANCH ]]; then
echo "BRANCH=r2++" >> $GITHUB_ENV
else
echo "BRANCH=${{ env.HEAD_BRANCH }}-ci" >> $GITHUB_ENV
fi
- name: Wait For Passing Tests
id: wait_for_tests
uses: lewagon/wait-on-check-action@v0.2
if: ${{ github.event_name == 'push' }}
with:
ref: ${{ github.sha }}
wait-interval: 60
check-name: 'wait for selfdrive'
- name: Prepare release files
if: ${{ github.event_name == 'workflow_dispatch' || steps.wait_for_tests.outcome == 'success'}}
run: |
chmod +x release/build_release_ci.sh
./release/build_release_ci.sh
- name: Push changes
if: ${{ github.event_name == 'workflow_dispatch' || steps.wait_for_tests.outcome == 'success'}}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.REPO_PAT }}
branch: ${{ env.BRANCH }}
directory: ${{ env.TARGET_DIR }}
force: true