Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit 636976b

Browse files
committed
ci: build both yt:backend and tk:backend with docker as CI step
1 parent 35a25d3 commit 636976b

3 files changed

Lines changed: 37 additions & 1 deletion

File tree

.github/workflows/master_release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ permissions:
99
contents: write
1010

1111
jobs:
12-
1312
build:
1413
name: Build
1514
runs-on: ubuntu-latest
@@ -155,6 +154,21 @@ jobs:
155154
git config --global user.name "Team - Tracking Exposed"
156155
yarn release-it --ci
157156
157+
# - name: Push image
158+
# run: |
159+
# IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$YT_IMAGE_NAME
160+
161+
# # Strip git ref prefix from version
162+
# VERSION=$(yarn release-it --no-github.release --release-version)
163+
# # Strip "v" prefix from tag name
164+
# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
165+
# # Use Docker `latest` tag convention
166+
# [ "$VERSION" == "master" ] && VERSION=latest
167+
# echo IMAGE_ID=$IMAGE_ID
168+
# echo VERSION=$VERSION
169+
# docker tag $YT_IMAGE_NAME $IMAGE_ID:$VERSION
170+
# docker push $IMAGE_ID:$VERSION
171+
158172
- name: Build Dashboard
159173
env:
160174
DOTENV_CONFIG_PATH: .env

.github/workflows/tk_pull_request.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
- "packages/**"
1616
- "platforms/tktrex/**"
1717

18+
env:
19+
TK_IMAGE_NAME: tk-backend
20+
1821
jobs:
1922
pull_request:
2023
runs-on: ubuntu-latest
@@ -65,3 +68,12 @@ jobs:
6568
yarn pm2 start platforms/tktrex/backend/ecosystem.config.js --env test
6669
yarn tk:backend test --runInBand --ci --forceExit
6770
yarn pm2 stop all
71+
72+
- name: Log in to registry
73+
# This is where you will update the personal access token to GITHUB_TOKEN
74+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
75+
76+
- name: Build TK Backend image
77+
run: docker build . --file Dockerfile.tkbackend --tag $TK_IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
78+
79+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
- "shared/**"
1616
- "platforms/yttrex/**"
1717

18+
env:
19+
YT_IMAGE_NAME: yt-backend
20+
1821
jobs:
1922
pull_request:
2023
runs-on: ubuntu-latest
@@ -71,3 +74,10 @@ jobs:
7174
yarn yt:backend test --runInBand --forceExit --ci
7275
yarn pm2 stop all
7376
77+
- name: Log in to registry
78+
# This is where you will update the personal access token to GITHUB_TOKEN
79+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
80+
81+
- name: Build TK Backend image
82+
run: docker build . --file Dockerfile.ytbackend --tag $YT_IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
83+

0 commit comments

Comments
 (0)