Skip to content

Commit 1782ce1

Browse files
feat: monorepo for Distribute
0 parents  commit 1782ce1

566 files changed

Lines changed: 62146 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Git
2+
.git
3+
.gitignore
4+
.github
5+
6+
# OS
7+
.DS_Store
8+
9+
# Paths not needed for API/Backend builds
10+
app/
11+
landing/
12+
docs/
13+
14+
# Node
15+
admin/node_modules/
16+
admin/dist/
17+
admin/coverage/
18+
19+
# Go build artifacts
20+
api/data/
21+
api/tmp/
22+
api/bin/
23+
api/vendor/

.github/changelog_config.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"categories": [
3+
{
4+
"title": "## 🚀 Features",
5+
"labels": [
6+
"feature",
7+
"feat"
8+
]
9+
},
10+
{
11+
"title": "## 🐛 Bug Fixes",
12+
"labels": [
13+
"fix",
14+
"bug"
15+
]
16+
},
17+
{
18+
"title": "## 🧪 Tests",
19+
"labels": [
20+
"test"
21+
]
22+
},
23+
{
24+
"title": "## ⚙️ CI/CD",
25+
"labels": [
26+
"ci"
27+
]
28+
},
29+
{
30+
"title": "## 📖 Documentation",
31+
"labels": [
32+
"docs"
33+
]
34+
},
35+
{
36+
"title": "## ♻️ Refactoring",
37+
"labels": [
38+
"refactor"
39+
]
40+
},
41+
{
42+
"title": "## 🧹 Chore",
43+
"labels": [
44+
"chore"
45+
]
46+
},
47+
{
48+
"title": "## 🎨 Style",
49+
"labels": [
50+
"style"
51+
]
52+
}
53+
],
54+
"ignore_labels": [
55+
"ignore"
56+
],
57+
"template": "${{CHANGELOG}}\n\n<details>\n<summary><b>Full List of Changes</b></summary>\n\n${{UNCATEGORIZED}}\n</details>",
58+
"pr_template": "- ${{TITLE}} #${{NUMBER}}",
59+
"empty_summary_template": "No significant changes.",
60+
"label_extractor": [
61+
{
62+
"pattern": "^(feat|feature|fix|bug|test|ci|build|docs|perf|refactor|chore|style)(\\(.+\\))?:",
63+
"target": "$1",
64+
"flags": "i"
65+
}
66+
]
67+
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Build and Publish Docker Image
2+
3+
on:
4+
push:
5+
tags: [ "s*" ]
6+
workflow_dispatch:
7+
8+
env:
9+
IMAGE_NAME: sourcelocation/distributor
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
platform:
18+
- linux/amd64
19+
- linux/arm64
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Docker Meta
26+
id: meta
27+
uses: docker/metadata-action@v5
28+
with:
29+
images: ${{ env.IMAGE_NAME }}
30+
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Log in to Docker Hub
38+
uses: docker/login-action@v3
39+
with:
40+
username: ${{ secrets.DOCKER_USERNAME }}
41+
password: ${{ secrets.DOCKER_PASSWORD }}
42+
43+
- name: Build and Push By Digest
44+
id: build
45+
uses: docker/build-push-action@v5
46+
with:
47+
context: .
48+
file: api/Dockerfile
49+
target: runner
50+
platforms: ${{ matrix.platform }}
51+
labels: ${{ steps.meta.outputs.labels }}
52+
outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
53+
cache-from: type=gha,scope=build-${{ matrix.platform }}
54+
cache-to: type=gha,mode=max,scope=build-${{ matrix.platform }}
55+
56+
- name: Export Digest
57+
run: |
58+
mkdir -p /tmp/digests
59+
digest="${{ steps.build.outputs.digest }}"
60+
touch "/tmp/digests/${digest#sha256:}"
61+
62+
- name: Upload Digest
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: digests-${{ strategy.job-index }}
66+
path: /tmp/digests/*
67+
if-no-files-found: error
68+
retention-days: 1
69+
70+
merge:
71+
runs-on: ubuntu-latest
72+
needs: build
73+
steps:
74+
- name: Download Digests
75+
uses: actions/download-artifact@v4
76+
with:
77+
pattern: digests-*
78+
path: /tmp/digests
79+
merge-multiple: true
80+
81+
- name: Set up Docker Buildx
82+
uses: docker/setup-buildx-action@v3
83+
84+
- name: Docker Meta
85+
id: meta
86+
uses: docker/metadata-action@v5
87+
with:
88+
images: ${{ env.IMAGE_NAME }}
89+
tags: |
90+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
91+
type=ref,event=tag
92+
93+
- name: Log in to Docker Hub
94+
uses: docker/login-action@v3
95+
with:
96+
username: ${{ secrets.DOCKER_USERNAME }}
97+
password: ${{ secrets.DOCKER_PASSWORD }}
98+
99+
- name: Create Manifest List and Push
100+
working-directory: /tmp/digests
101+
run: |
102+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
103+
$(printf '${{ env.IMAGE_NAME }}@sha256:%s ' *)
104+
105+
- name: Inspect Image
106+
run: |
107+
docker buildx imagetools inspect ${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Deploy Docs to Vercel
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'api/docs/swagger.json'
9+
10+
jobs:
11+
trigger-vercel-deployment:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Trigger Vercel Deployment
15+
run: |
16+
curl -X POST "${{ secrets.VERCEL_DEPLOY_HOOK_URL }}"
17+
env:
18+
VERCEL_DEPLOY_HOOK_URL: ${{ secrets.VERCEL_DEPLOY_HOOK_URL }}

0 commit comments

Comments
 (0)