-
Notifications
You must be signed in to change notification settings - Fork 653
98 lines (87 loc) · 2.81 KB
/
container-build.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Create and publish Container image
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
target_board:
- CC1352P_2_LAUNCHXL
- CC26X2R1_LAUNCHXL
- LP_CC2652R7
- LP_CC2652RB
- LP_CC2652RB
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
android: true
docker-images: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
tool-cache: true
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=edge
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
flavor: |
latest=auto
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Containerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
load: true
- name: Prepare workspace
uses: addnab/docker-run-action@v3
with:
image: ${{ steps.meta.outputs.tags }}
run: |
echo "Hello World"
ls -laF /build || true
find /
eclipse -noSplash -data "${HOME}/workspace" -application com.ti.ccstudio.apps.projectImport -ccs.location "${SLF2_SDK}/examples/rtos/${{ matrix.target_board }}/zstack/znp/tirtos7/ticlang/znp_${{ matrix.target_board }}_tirtos7_ticlang.projectspec"
cp '/src/znp_${{ matrix.target_board }}_tirtos7_ticlang.syscfg' "${HOME}/workspace/znp_${{ matrix.target_board }}/znp.syscfg"
eclipse -noSplash -data "${HOME}/workspace" -application 'com.ti.ccstudio.apps.projectBuild' -ccs.projects 'znp_${{ matrix.target_board }}_tirtos7_ticlang'