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

Commit

Permalink
ci: build both yt:backend and tk:backend with docker as CI step
Browse files Browse the repository at this point in the history
  • Loading branch information
ascariandrea committed Nov 15, 2022
1 parent 35a25d3 commit 636976b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/master_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ permissions:
contents: write

jobs:

build:
name: Build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -155,6 +154,21 @@ jobs:
git config --global user.name "Team - Tracking Exposed"
yarn release-it --ci
# - name: Push image
# run: |
# IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$YT_IMAGE_NAME

# # Strip git ref prefix from version
# VERSION=$(yarn release-it --no-github.release --release-version)
# # Strip "v" prefix from tag name
# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# # Use Docker `latest` tag convention
# [ "$VERSION" == "master" ] && VERSION=latest
# echo IMAGE_ID=$IMAGE_ID
# echo VERSION=$VERSION
# docker tag $YT_IMAGE_NAME $IMAGE_ID:$VERSION
# docker push $IMAGE_ID:$VERSION

- name: Build Dashboard
env:
DOTENV_CONFIG_PATH: .env
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/tk_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
- "packages/**"
- "platforms/tktrex/**"

env:
TK_IMAGE_NAME: tk-backend

jobs:
pull_request:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -65,3 +68,12 @@ jobs:
yarn pm2 start platforms/tktrex/backend/ecosystem.config.js --env test
yarn tk:backend test --runInBand --ci --forceExit
yarn pm2 stop all
- name: Log in to registry
# This is where you will update the personal access token to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Build TK Backend image
run: docker build . --file Dockerfile.tkbackend --tag $TK_IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"


Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
- "shared/**"
- "platforms/yttrex/**"

env:
YT_IMAGE_NAME: yt-backend

jobs:
pull_request:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,3 +74,10 @@ jobs:
yarn yt:backend test --runInBand --forceExit --ci
yarn pm2 stop all
- name: Log in to registry
# This is where you will update the personal access token to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Build TK Backend image
run: docker build . --file Dockerfile.ytbackend --tag $YT_IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"

0 comments on commit 636976b

Please sign in to comment.