-
Notifications
You must be signed in to change notification settings - Fork 316
45 lines (37 loc) · 1.35 KB
/
ci_push.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
name: Build, test and push packages CI
on:
push:
branches-ignore:
- gh-pages
- ros2
jobs:
build-focal:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Checkout submodule
run: git submodule update --init --depth 1 description/media
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Build, test, push docker
run: >
revision="latest";
build_arg="astrobee";
push_arg="";
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}};
if [ "${{ github.repository_owner }}" == "nasa" ]; then
if [ $branch == "develop" ]; then
push_arg="push_astrobee";
fi;
if [ $branch == "master" ]; then
export VERSION=`grep -w -m 1 "Release" RELEASE.md | awk '{print $3}'`;
revision="v${VERSION}";
build_arg="astrobee_base astrobee";
push_arg="push_astrobee_base push_astrobee";
fi;
fi;
command="./scripts/docker/build.sh --focal --remote --revision ${revision} \
--owner ${{ github.repository_owner }} \
${build_arg} test_astrobee ${push_arg}";
echo "$command";
eval "$command";