-
Notifications
You must be signed in to change notification settings - Fork 19
171 lines (147 loc) · 7.15 KB
/
creator_workflow.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: CREATOR workflow CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
packages: write
jobs:
creator-checker:
name: Execute CREATOR Checker
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- run: npm run build --if-present
- run: npm run test-creator-node
build-creator-cl:
name: Build creator_cl Docker Image
needs: creator-checker
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Package Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build & Push Docker image
run: cd ./dockers/command_line/ && docker buildx build -t ghcr.io/${{ github.repository_owner }}/creator_cl:${GITHUB_SHA} -t ghcr.io/${{ github.repository_owner }}/creator_cl -f ./Dockerfile --push --platform=linux/amd64,linux/arm64,linux/arm/v7 .
push-creator-cl:
name: Push creator_cl Docker Image
needs: build-creator-cl
if: github.event_name != 'pull_request' && github.repository_owner == 'creatorsim'
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
env:
DH_TOKEN: ${{ secrets.DOCKER_HUB_PASSWORD }}
run: docker login -u creatorsim -p ${DH_TOKEN}
- name: Re-tag & Push Docker Image to Docker Hub
run: |
chmod +r $HOME/.docker/config.json
docker container run --rm --network host -v regctl-conf:/home/appuser/.regctl/ -v $HOME/.docker/config.json:/home/appuser/.docker/config.json regclient/regctl:v0.3.9 image copy ghcr.io/${{ github.repository_owner }}/creator_cl:${GITHUB_SHA} docker.io/creatorsim/creator_cl:${GITHUB_SHA}
docker container run --rm --network host -v regctl-conf:/home/appuser/.regctl/ -v $HOME/.docker/config.json:/home/appuser/.docker/config.json regclient/regctl:v0.3.9 image copy ghcr.io/${{ github.repository_owner }}/creator_cl docker.io/creatorsim/creator_cl
build-creator-gateway:
name: Build creator_gateway Docker Image
needs: creator-checker
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Package Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build & Push Docker image
run: cd ./dockers/gateway/ && docker buildx build -t ghcr.io/${{ github.repository_owner }}/creator_gateway:${GITHUB_SHA} -t ghcr.io/${{ github.repository_owner }}/creator_gateway -f ./Dockerfile --push --platform=linux/amd64,linux/arm64,linux/arm/v7 .
push-creator-gateway:
name: Push creator_gateway Docker Image
needs: build-creator-gateway
if: github.event_name != 'pull_request' && github.repository_owner == 'creatorsim'
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
env:
DH_TOKEN: ${{ secrets.DOCKER_HUB_PASSWORD }}
run: docker login -u creatorsim -p ${DH_TOKEN}
- name: Re-tag & Push Docker Image to Docker Hub
run: |
chmod +r $HOME/.docker/config.json
docker container run --rm --network host -v regctl-conf:/home/appuser/.regctl/ -v $HOME/.docker/config.json:/home/appuser/.docker/config.json regclient/regctl:v0.3.9 image copy ghcr.io/${{ github.repository_owner }}/creator_gateway:${GITHUB_SHA} docker.io/creatorsim/creator_gateway:${GITHUB_SHA}
docker container run --rm --network host -v regctl-conf:/home/appuser/.regctl/ -v $HOME/.docker/config.json:/home/appuser/.docker/config.json regclient/regctl:v0.3.9 image copy ghcr.io/${{ github.repository_owner }}/creator_gateway docker.io/creatorsim/creator_gateway
build-creator-hw-lab:
name: Build creator_remote_lab Docker Image
needs: creator-checker
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Package Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build & Push Docker image
run: cd ./dockers/remote_lab/ && docker buildx build -t ghcr.io/${{ github.repository_owner }}/creator_remote_lab:${GITHUB_SHA} -t ghcr.io/${{ github.repository_owner }}/creator_remote_lab -f ./Dockerfile --push --platform=linux/amd64,linux/arm64,linux/arm/v7 .
push-creator-hw-lab:
name: Push creator_remote_lab Docker Image
needs: build-creator-hw-lab
if: github.event_name != 'pull_request' && github.repository_owner == 'creatorsim'
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
env:
DH_TOKEN: ${{ secrets.DOCKER_HUB_PASSWORD }}
run: docker login -u creatorsim -p ${DH_TOKEN}
- name: Re-tag & Push Docker Image to Docker Hub
run: |
chmod +r $HOME/.docker/config.json
docker container run --rm --network host -v regctl-conf:/home/appuser/.regctl/ -v $HOME/.docker/config.json:/home/appuser/.docker/config.json regclient/regctl:v0.3.9 image copy ghcr.io/${{ github.repository_owner }}/creator_remote_lab:${GITHUB_SHA} docker.io/creatorsim/creator_remote_lab:${GITHUB_SHA}
docker container run --rm --network host -v regctl-conf:/home/appuser/.regctl/ -v $HOME/.docker/config.json:/home/appuser/.docker/config.json regclient/regctl:v0.3.9 image copy ghcr.io/${{ github.repository_owner }}/creator_remote_lab docker.io/creatorsim/creator_remote_lab