Skip to content

feat(observability): implements client side logging configuration #78

feat(observability): implements client side logging configuration

feat(observability): implements client side logging configuration #78

name: Release All Apps
on:
push:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.14.0
- name: Restore root node_modules cache
uses: actions/cache@v4
id: cache
with:
path: |
node_modules
apps/api/node_modules
apps/deploy-web/node_modules
packages/*/node_modules
key: common-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get the latest tag
id: latest_tag
run: |
output="value=$(git describe --tags --abbrev=0)"
echo $output
echo $output >> $GITHUB_OUTPUT
- name: Generate releases and build docker images
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "CI"
npm run release -w apps/api -- --preRelease=beta --verbose --ci -r ${{ vars.API_REGISTRY }}
npm run release -w apps/deploy-web -- --preRelease=beta -f --verbose --ci -r ${{ vars.WEB_REGISTRY }}
- name: Trigger deployments
run: |
latest_tag=${{ steps.latest_tag.outputs.value }}
api_tags=$(git tag --sort=-creatordate --merged | grep '^console-api/v')
new_api_tag=$(echo "$api_tags" | awk -v latest="$latest_tag" '$0 > latest' | head -n 1)
if [ -z "$new_api_tag" ]; then
echo "No new console-api tag found. Skipping api deployment."
else
echo "Dispatching deploy workflow for: $new_api_tag"
curl -X POST \
-H "Authorization: token ${{ secrets.AKASH_GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/deploy-api-to-akash.yml/dispatches \
-d "{\"ref\": \"main\", \"inputs\": { \"tag\": \"$new_api_tag\" }}"
fi