-
Notifications
You must be signed in to change notification settings - Fork 126
84 lines (70 loc) · 2.38 KB
/
docker_build_kraken_debian11.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
78
79
80
81
82
83
84
name: Build Navitia Dockers
on:
pull_request:
push:
branches:
- dev
tags:
- '*'
jobs:
common_variables:
name: Common variables
runs-on: [self-hosted, kraken, sandbox]
outputs:
RELEASE_TAG: ${{ steps.choose_navitia_tag.outputs.navitia_tag }}
steps:
- name: force chown to avoid errors
run: sudo chown -R $USER:$USER .
- name: Generate github private access token
id: ci-core-app-token
uses: getsentry/action-github-app-token@v2.0.0
with:
app_id: ${{ secrets.CI_CORE_APP_ID }}
private_key: ${{ secrets.CI_CORE_APP_PEM }}
- name: Checkout navitia
id: checkout_navitia
uses: actions/checkout@v3
with:
token: ${{ steps.ci-core-app-token.outputs.token }}
# we need entire history for tags
fetch-depth: 0
- name: Choose navitia tag
id: choose_navitia_tag
run: |
version=$(git describe --tags)
echo "navitia_tag=$version" >> $GITHUB_OUTPUT
debian11_kraken_image:
runs-on: [self-hosted, kraken, sandbox]
name: Build debian11 kraken image
needs: common_variables
steps:
- name: force chown to avoid errors
run: sudo chown -R $USER:$USER .
- name: Git config
run: git config --global --add safe.directory /__w/navitia/navitia
- name: Generate github private access token
id: ci-core-app-token
uses: getsentry/action-github-app-token@v2.0.0
with:
app_id: ${{ secrets.CI_CORE_APP_ID }}
private_key: ${{ secrets.CI_CORE_APP_PEM }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ steps.ci-core-app-token.outputs.token }}
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
env:
AWS_REGION: eu-west-1
with:
registries: "162230498103"
- name: Create builder docker
run: |
docker build -f docker/debian11/Dockerfile-builder-kraken -t navitia/builder .
- name: Build packages in master docker
# Will build navitia-*.deb packages in current folder
run: docker run -v `pwd`:/navitia/navitia/ navitia/builder
- name: Create navitia images
run: |
docker build -t navitia/kraken -f docker/debian11/Dockerfile-kraken .