Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/filter-options/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
2 changes: 1 addition & 1 deletion .github/actions/filter-options/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ outputs:
filtered:
description: JSON array of filtered values based on selected options
runs:
using: 'node12'
using: 'node20'
main: 'dist/index.js'
33,053 changes: 29,910 additions & 3,143 deletions .github/actions/filter-options/dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/actions/filter-options/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const core = require('@actions/core');
const yaml = require('js-yaml');
const fs = require('fs');
import * as core from '@actions/core';
import yaml from 'js-yaml';
import fs from 'fs';

function isPathInput(text) {
return !(text.includes('\n') || text.includes(':'))
Expand Down
95 changes: 86 additions & 9 deletions .github/actions/filter-options/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions .github/actions/filter-options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "ncc build index.js -o dist"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.5.0",
"@actions/core": "^1.11.1",
"js-yaml": "^4.1.0"
},
"devDependencies": {
"@vercel/ncc": "^0.38.3"
}
}
50 changes: 37 additions & 13 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
# Add 'repo' label to any root file changes
repo: ./*
repo:
- changed-files:
- any-glob-to-any-file: './*'

# Add 'test' label to any top-level test changes
test: tests/**/*
test:
- changed-files:
- any-glob-to-any-file: 'tests/**/*'

# Add 'workflow' label to any github action file changes
workflow: .github/**/*
# Add 'workflow' label to any GitHub action file changes
workflow:
- changed-files:
- any-glob-to-any-file: '.github/**/*'

# Add 'charts' to any changes within 'charts' folder or any subfolders
charts: charts/**/*
charts:
- changed-files:
- any-glob-to-any-file: 'charts/**/*'

# Add 'services' to any change within 'services' folder or any subfolders
services: services/**/*

# Add service specific label to distinguish which services have changed
auth-service: services/auth-service/**/*
gateway: services/gateway/**/*
training-service: services/training-service/**/*
ui: services/ui/**/*
user-service: services/user-service/**/*
services:
- changed-files:
- any-glob-to-any-file: 'services/**/*'

# Add service-specific label to distinguish which services have changed
auth-service:
- changed-files:
- any-glob-to-any-file: 'services/auth-service/**/*'

gateway:
- changed-files:
- any-glob-to-any-file: 'services/gateway/**/*'

training-service:
- changed-files:
- any-glob-to-any-file: 'services/training-service/**/*'

ui:
- changed-files:
- any-glob-to-any-file: 'services/ui/**/*'

user-service:
- changed-files:
- any-glob-to-any-file: 'services/user-service/**/*'
18 changes: 12 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

name: Service CI

permissions:
contents: read
packages: write

on:
pull_request:
branches: [main]
Expand All @@ -23,7 +27,7 @@ jobs:
matrix-include: ${{ steps.set-matrix.outputs.filtered }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Check for changes
uses: dorny/paths-filter@v3
id: filter
Expand All @@ -47,12 +51,14 @@ jobs:
working-directory: ${{ matrix.context }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: ${{ matrix.context }}/package-lock.json

- name: Install NPM Dependencies
run: npm ci --quiet
Expand All @@ -65,22 +71,22 @@ jobs:

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ matrix.image }}
tags: |
type=sha
type=ref,event=pr

- name: Log in to the Container registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
push: ${{ github.event_name != 'pull_request' }}
Expand Down
71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ on: pull_request_target

jobs:
label:

permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest

steps:
- uses: actions/labeler@v3
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
15 changes: 11 additions & 4 deletions .github/workflows/release-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ on:

jobs:
release:
permissions:
contents: write
packages: write
pages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -23,15 +27,18 @@ jobs:
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Set up Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v4
with:
version: v3.4.0
version: v3.18.4

- name: Add dependency chart repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
uses: helm/chart-releaser-action@v1.7.0
with:
charts_dir: charts
config: cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Loading
Loading