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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/go:1.24-bookworm
FROM mcr.microsoft.com/devcontainers/go:1.25-bookworm

# Install node environment
RUN apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "go:1.24-bookworm",
"name": "go:1.25.8-bookworm",
"runArgs": [
"--name=database",
"--network=host"
Expand Down
27 changes: 9 additions & 18 deletions .github/workflows/issue-userstory-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,12 @@ on:

jobs:
create-issue:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create Issue with User Story
uses: cedricve/llm-create-issue-user-story@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
azure_openai_api_key: ${{ secrets.AZURE_OPENAI_API_KEY }}
azure_openai_endpoint: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
azure_openai_version: ${{ secrets.AZURE_OPENAI_VERSION }}
openai_model: 'gpt-4o'
issue_title: ${{ github.event.inputs.issue_title }}
issue_description: ${{ github.event.inputs.issue_description }}
complexity: ${{ github.event.inputs.complexity }}
duration: ${{ github.event.inputs.duration }}
labels: 'user-story,feature'
assignees: ${{ github.actor }}
uses: uug-ai/workflows/.github/workflows/issue-userstory-create.yml@main
with:
issue_title: ${{ github.event.inputs.issue_title }}
issue_description: ${{ github.event.inputs.issue_description }}
complexity: ${{ github.event.inputs.complexity }}
duration: ${{ github.event.inputs.duration }}
labels: 'user-story,feature'
assignees: ${{ github.actor }}
secrets: inherit
68 changes: 9 additions & 59 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,14 @@ on:
pull_request:
types: [opened, synchronize, reopened]

env:

# Build variables
ORGANIZATION: uug-ai
PROJECT: ${{ github.event.repository.name }}
GO_VERSION: "1.24"
GO_DIR : "./"

jobs:

build:
runs-on: ${{ matrix.runner }}
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
MONGODB_HOST: ${{ secrets.MONGODB_HOST }}
MONGODB_DATABASE_CREDENTIALS: ${{ secrets.MONGODB_DATABASE_CREDENTIALS }}
MONGODB_USERNAME: ${{ secrets.MONGODB_USERNAME }}
MONGODB_PASSWORD: ${{ secrets.MONGODB_PASSWORD }}
permissions:
contents: write
packages: write
strategy:
matrix:
include:
- architecture: amd64
runner: ubuntu-24.04
- architecture: arm64
runner: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
check-latest: true
cache-dependency-path: |
go.sum
# Test the Golang application
- name: Test Golang application
run: |
git config --global url."https://${{ secrets.USERNAME }}:${{ secrets.TOKEN }}@github.com/".insteadOf "https://github.com/"
go fmt $(go list ./... | grep -v /vendor/)
go vet $(go list ./... | grep -v /vendor/)
go test -race $(go list ./... | grep -v /vendor/)
# Build the Golang application to the dist folder
- name: Build Golang application
run: |
git config --global url."https://${{ secrets.USERNAME }}:${{ secrets.TOKEN }}@github.com/".insteadOf "https://github.com/"
go build -o main
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.USERNAME }}
password: ${{ secrets.TOKEN }}
- name: Run Build
run: |
docker build -t ${{matrix.architecture}} \
--build-arg project=${{ env.PROJECT }} \
--build-arg github_username=${{ secrets.USERNAME }} \
--build-arg github_token=${{ secrets.TOKEN }} .
uses: uug-ai/workflows/.github/workflows/pr-build.yml@main
with:
project: ${{ github.event.repository.name }}
go_version: "1.25.8"
go_dir: "."
go_sum_path: "go.sum"
docker_context: "."
runner_matrix: '[{"architecture":"amd64","runner":"ubuntu-24.04"},{"architecture":"arm64","runner":"ubuntu-24.04-arm"}]'
secrets: inherit
24 changes: 6 additions & 18 deletions .github/workflows/pr-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,11 @@ name: Autofill PR description

on: pull_request

env:
PR_NUMBER: ${{ github.event.number }}
PROJECT: ${{ github.event.repository.name }}

jobs:
openai-pr-description:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- name: Autofill PR description if empty using OpenAI
uses: cedricve/azureopenai-pr-description@master
with:
github_token: ${{ secrets.TOKEN }}
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
azure_openai_api_key: ${{ secrets.AZURE_OPENAI_API_KEY }}
azure_openai_endpoint: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
azure_openai_version: ${{ secrets.AZURE_OPENAI_VERSION }}
openai_model: ${{ secrets.OPENAI_MODEL }}
overwrite_description: true
uses: uug-ai/workflows/.github/workflows/pr-description.yml@main
with:
pr_number: ${{ github.event.number }}
pull_request_url: ""
overwrite_description: true
secrets: inherit
83 changes: 14 additions & 69 deletions .github/workflows/release-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,73 +3,18 @@ on:
release:
types: [created]

env:

# Build variables
ORGANIZATION: uug-ai
PROJECT: ${{ github.event.repository.name }}
GO_VERSION: "1.24"
GO_DIR : "./"

jobs:

build:
runs-on: ${{ matrix.runner }}
permissions:
contents: write
packages: write
strategy:
matrix:
include:
- architecture: amd64
runner: ubuntu-24.04
- architecture: arm64
runner: sh-ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.USERNAME }}
password: ${{ secrets.TOKEN }}
- name: Run Build
run: |
docker build -t ${{matrix.architecture}} \
--build-arg project=${{ env.PROJECT }} \
--build-arg github_username=${{ secrets.USERNAME }} \
--build-arg github_token=${{ secrets.TOKEN }} .

- name: Build and push Docker image
run: |
docker tag ${{matrix.architecture}} ghcr.io/$ORGANIZATION/$PROJECT-platform:${{matrix.architecture}}-${{github.event.inputs.tag || github.ref_name}}
docker push ghcr.io/$ORGANIZATION/$PROJECT-platform:${{matrix.architecture}}-${{github.event.inputs.tag || github.ref_name}}


create-manifest:
runs-on: ubuntu-24.04
needs: [build]
permissions:
packages: write
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.USERNAME }}
password: ${{ secrets.TOKEN }}
- name: Wait for image propagation
run: sleep 10
- name: Create and push multi-arch manifest
run: |
docker manifest create ghcr.io/$ORGANIZATION/$PROJECT:${{ github.event.inputs.tag || github.ref_name }} \
ghcr.io/$ORGANIZATION/$PROJECT-platform:amd64-${{github.event.inputs.tag || github.ref_name}} \
ghcr.io/$ORGANIZATION/$PROJECT-platform:arm64-${{github.event.inputs.tag || github.ref_name}}
docker manifest push ghcr.io/$ORGANIZATION/$PROJECT:${{ github.event.inputs.tag || github.ref_name }}
- name: Create and push latest manifest
run: |
docker manifest create ghcr.io/$ORGANIZATION/$PROJECT:latest \
ghcr.io/$ORGANIZATION/$PROJECT-platform:amd64-${{github.event.inputs.tag || github.ref_name}} \
ghcr.io/$ORGANIZATION/$PROJECT-platform:arm64-${{github.event.inputs.tag || github.ref_name}}
docker manifest push ghcr.io/$ORGANIZATION/$PROJECT:latest
release:
uses: uug-ai/workflows/.github/workflows/release-create.yml@main
with:
organization: uug-ai
project: ${{ github.event.repository.name }}
tag: ${{ github.event.release.tag_name }}
docker_context: "."
runner_matrix: >-
[
{"architecture":"amd64","runner":"ubuntu-24.04"},
{"architecture":"arm64","runner":"sh-ubuntu-24.04-arm"}
]
create_gitops_pr: false
secrets: inherit
53 changes: 5 additions & 48 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,10 @@ on:
branches:
- main

env:
PR_NUMBER: ${{ github.event.number }}
PROJECT: ${{ github.event.repository.name }}
SHA: ${{ github.sha }}

jobs:
security-scan:
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Build the Docker image with the latest tag and the release tag
- name: Build Docker image with PR tag
run: |
docker build -t ${{ env.PROJECT }} \
--build-arg project=${{ env.PROJECT }} \
--build-arg github_username=${{ secrets.USERNAME }} \
--build-arg github_token=${{ secrets.TOKEN }} .

# This is a workaround for the issue with the Trivy DBs not being available due to
# rate limiting. The workaround is to download the DBs and cache them.
- name: Setup oras
uses: oras-project/setup-oras@v1
- name: Download and extract the vulnerability DB
run: |
mkdir -p $GITHUB_WORKSPACE/.cache/trivy/db
oras pull ghcr.io/aquasecurity/trivy-db:2
tar -xzf db.tar.gz -C $GITHUB_WORKSPACE/.cache/trivy/db

# Scan the Docker image for vulnerabilities
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@v0.35.0
with:
skip-setup-trivy: false
scan-type: "image"
image-ref: ${{ env.PROJECT }}
format: "table"
exit-code: "0"
ignore-unfixed: false
vuln-type: "os,library"
severity: "CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN"
#Below only works on the main branch
#format: "github"
#github-pat: ${{ secrets.TOKEN }}
env:
TRIVY_SKIP_DB_UPDATE: true
uses: uug-ai/workflows/.github/workflows/security-scan.yml@main
with:
project: ${{ github.event.repository.name }}
docker_context: "."
secrets: inherit
61 changes: 9 additions & 52 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,14 @@ on:
branches:
- main

env:
ORGANIZATION: uug-ai
PROJECT: ${{ github.event.repository.name }}
PR_NUMBER: ${{ github.event.number }}
SHA: ${{ github.sha }}

GO_VERSION: 1.24

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
MONGODB_HOST: ${{ secrets.MONGODB_HOST }}
MONGODB_DATABASE_CREDENTIALS: ${{ secrets.MONGODB_DATABASE_CREDENTIALS }}
MONGODB_USERNAME: ${{ secrets.MONGODB_USERNAME }}
MONGODB_PASSWORD: ${{ secrets.MONGODB_PASSWORD }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v2
# Setup Golang for us in the workflow
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
check-latest: true
cache-dependency-path: |
go.sum
# Test the Golang application
- name: Test Golang application
run: |
git config --global url."https://${{ secrets.USERNAME }}:${{ secrets.TOKEN }}@github.com/".insteadOf "https://github.com/"
go fmt $(go list ./... | grep -v /vendor/)
go vet $(go list ./... | grep -v /vendor/)
go test -race $(go list ./... | grep -v /vendor/)
# Print out test coverage
- name: Print test coverage
run: |
go test -coverprofile=coverage.out $(go list ./... | grep -v /vendor/)
go tool cover -func=coverage.out
go tool cover -html=coverage.out -o coverage.html
# Upload test coverage report
- name: Upload test coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.html
# Upload coverage reports to Codecov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ env.ORGANIZATION }}/${{ env.PROJECT }}
fail_ci_if_error: false
uses: uug-ai/workflows/.github/workflows/test-coverage.yaml@main
with:
organization: uug-ai
project: ${{ github.event.repository.name }}
go_version: "1.25.8"
go_dir: "."
go_sum_path: "go.sum"
coverage_artifact_name: coverage-report
secrets: inherit
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/go:1.24-bookworm AS builder
FROM mcr.microsoft.com/devcontainers/go:1.25-bookworm AS builder

ENV GOROOT=/usr/local/go
ENV GOPATH=/go
Expand Down
Loading
Loading