forked from ros2/cartographer_ros
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (67 loc) · 2.34 KB
/
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CD
on:
push:
tags:
- v*
jobs:
ecr_setting:
# if: contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/deploy')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: AWS Mfa login
uses: ./.github/actions/aws-mfa-login
with:
access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
mfa_key: ${{ secrets.MFA_KEY }}
mfa_arn: ${{ secrets.MFA_ARN }}
- id: get_ecr_password
name: Get ECR password
run: |
PROIFLE_REGION=$(aws configure get region)
ECR_PASSWORD=$(aws ecr get-login-password --region $PROIFLE_REGION)
echo "ECR_PASSWORD=$ECR_PASSWORD" >> $GITHUB_OUTPUT
outputs:
ecr_password: ${{ steps.get_ecr_password.outputs.ECR_PASSWORD }}
debian_build:
needs: ecr_setting
runs-on: ubuntu-latest
container:
image: 557571393534.dkr.ecr.ap-northeast-2.amazonaws.com/floom
credentials:
username: AWS
password: ${{ needs.ecr_setting.outputs.ecr_password }}
steps:
- name: Update dist
run: sudo apt update
- uses: actions/checkout@v3
with:
path: 'flody_ws/etc/'
- name: AWS Mfa login
uses: ./flody_ws/etc/.github/actions/aws-mfa-login
with:
access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
mfa_key: ${{ secrets.MFA_KEY }}
mfa_arn: ${{ secrets.MFA_ARN }}
- name: PPA server access
uses: ./flody_ws/etc/.github/actions/floatic-ppa-access
with:
target_group_name: ${{ secrets.SECURITY_GROUP_NAME }}
- name: Checkout submodules
run: |
cd flody_ws/etc
git submodule update --init --recursive
- name: Generate debian file
run: |
source /opt/floatic/debian/ros/humble/setup.bash
cd flody_ws/etc
floom-generate rosdebian
ls debian_results/*.deb
shell: bash
- name: Upload to S3
run: |
ls flody_ws/etc/debian_results/
aws s3 cp flody_ws/etc/debian_results s3://robotics-workflow-archive/cartographer_ros --include "*.deb" --recursive