Skip to content

Commit b9982b5

Browse files
Initial seperation of containers
1 parent 61cf4d5 commit b9982b5

25 files changed

+1123
-0
lines changed

.actrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--use-new-action-cache
2+
--action-cache-path=.github/cache/act/actions
3+
--cache-server-path=.github/cache/act/cache
4+
--artifact-server-path=.github/cache/act/artifacts
5+
--artifact-server-port=34007
6+
--platform self-hosted=ghcr.io/catthehacker/ubuntu:act-latest
7+
--platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
8+
--platform ubuntu-22.04=ghcr.io/catthehacker/ubuntu:act-22.04
9+
--platform ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
10+
--platform ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04

.github/workflows/mysql-proxy.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build MySQL Proxy
2+
3+
permissions:
4+
contents: read
5+
packages: write
6+
7+
on:
8+
workflow_call:
9+
workflow_dispatch:
10+
push:
11+
branches:
12+
- main
13+
schedule:
14+
- cron: "0 14 * * 2" # 2pm Patch Tuesday
15+
16+
concurrency:
17+
group: ${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
mysql-proxy-build:
22+
name: "Build"
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: "Setup: Setup QEMU"
26+
uses: docker/setup-qemu-action@v3
27+
28+
- name: "Setup: Expose GitHub Runtime"
29+
uses: crazy-max/ghaction-github-runtime@v3
30+
31+
- name: "Setup: Setup Docker Buildx"
32+
uses: docker/setup-buildx-action@v2
33+
34+
- name: "Setup: Login to Docker Hub"
35+
uses: docker/login-action@v3
36+
with:
37+
username: matthewbaggett
38+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
39+
40+
- name: "Setup: Login to GHCR"
41+
uses: docker/login-action@v3
42+
with:
43+
registry: ghcr.io
44+
username: matthewbaggett
45+
password: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: "Setup: Checkout Source"
48+
uses: actions/checkout@v4
49+
with:
50+
sparse-checkout: |
51+
mysql-proxy
52+
53+
- name: "Build: Build & Push Image"
54+
uses: docker/build-push-action@v5
55+
with:
56+
context: mysql-proxy
57+
target: mysql-proxy
58+
platforms: ${{ !env.ACT && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
59+
pull: true
60+
push: true
61+
tags: |
62+
${{ !env.ACT && 'benzine/mysql-proxy:latest' || '' }}
63+
${{ !env.ACT && 'ghcr.io/benzine-framework/mysql-proxy:latest' || 'ghcr.io/benzine-framework/mysql-proxy:devel' }}
64+
cache-from: ${{ !env.ACT && 'type=gha' || '' }}
65+
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || '' }}
66+
build-contexts: |
67+
marshall:version=docker-image://ghcr.io/benzine-framework/marshall:focal

.github/workflows/trunk.cache.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Trunk Cache
2+
3+
permissions: read-all
4+
5+
on:
6+
workflow_call:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- .trunk/trunk.yaml
13+
schedule:
14+
- cron: "0 9 * * 1" # 9am Tooling Monday
15+
16+
concurrency:
17+
group: ${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
trunk-cache:
22+
name: Trunk Cache
23+
runs-on: ubuntu-latest
24+
permissions:
25+
actions: write
26+
steps:
27+
- name: "Setup PHP"
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: 8.3
31+
- name: "Checkout"
32+
uses: actions/checkout@v4
33+
- name: "Trunk Cache"
34+
uses: trunk-io/trunk-action@v1
35+
with:
36+
check-mode: populate_cache_only

.github/workflows/trunk.check.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Trunk Check
2+
3+
permissions: read-all
4+
5+
on:
6+
workflow_call:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- main
11+
schedule:
12+
- cron: "0 11 * * 2" # 11am Patch Tuesday
13+
14+
concurrency:
15+
group: ${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
trunk-check:
20+
name: Trunk Check Runner
21+
runs-on: ubuntu-latest
22+
permissions:
23+
checks: write # For trunk to post annotations
24+
contents: read # For repo checkout
25+
steps:
26+
- name: "Setup PHP"
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: 8.3
30+
- name: "Checkout"
31+
uses: actions/checkout@v4
32+
- name: "Trunk Check"
33+
uses: trunk-io/trunk-action@v1

.github/workflows/trunk.upgrade.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Trunk Upgrade
2+
3+
permissions: read-all
4+
5+
on:
6+
workflow_call:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- .trunk/trunk.yaml
13+
- .github/workflows/trunk.upgrade.yml
14+
schedule:
15+
- cron: "0 11 * * 1" # 11am Tooling Monday
16+
17+
concurrency:
18+
group: ${{ github.head_ref || github.run_id }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
trunk-upgrade:
23+
name: Upgrade Trunk
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: write # For trunk to create PRs
27+
pull-requests: write # For trunk to create PRs
28+
steps:
29+
- name: "Setup PHP"
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: 8.3
33+
- name: "Checkout"
34+
uses: actions/checkout@v4
35+
- name: "Trunk Upgrade"
36+
uses: trunk-io/trunk-action/upgrade@v1
37+
- name: "PR: Find Pull Request"
38+
uses: juliangruber/find-pull-request-action@v1
39+
id: find-pull-request
40+
with:
41+
labels: trunk
42+
- name: "PR: Enable Pull Request Automerge"
43+
continue-on-error: true
44+
uses: peter-evans/enable-pull-request-automerge@v3
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
pull-request-number: ${{ steps.find-pull-request.outputs.number }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.idea
2+
/vendor/
3+
/.secrets

.trunk/configs/.checkov.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
skip-check:
3+
- CKV_SECRET_* # Skip all checks that start with CKV_SECRET, we already have gitleaks doing this.

.trunk/configs/.gitleaks.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
title = "Gitleaks config"
2+
[extend]
3+
useDefault = true

.trunk/configs/.gitleaksignore

Whitespace-only changes.

.trunk/configs/.hadolint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ignored:
2+
- DL3006
3+
- DL3008

0 commit comments

Comments
 (0)