Skip to content

Commit cdb9426

Browse files
committed
Add new image Dockerfiles and actions workflows
1 parent 557e849 commit cdb9426

File tree

16 files changed

+681
-0
lines changed

16 files changed

+681
-0
lines changed

.github/workflows/base.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: build base
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 * * 1'
6+
push:
7+
branches:
8+
- master
9+
paths:
10+
- base/**
11+
- scripts/ampstart.sh
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
jobs:
17+
push:
18+
if: ${{ github.repository_owner == 'CubeCoders' }}
19+
name: "amp:${{ matrix.base }}"
20+
runs-on: ubuntu-latest
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
base:
25+
- debian
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: docker/setup-qemu-action@v3
29+
- uses: docker/setup-buildx-action@v3
30+
- uses: docker/login-action@v3
31+
with:
32+
registry: ghcr.io
33+
username: cubecoders
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
- uses: docker/build-push-action@v6
36+
with:
37+
context: .
38+
file: ./base/${{ matrix.base }}/Dockerfile
39+
platforms: linux/amd64,linux/arm64/v8
40+
push: true
41+
tags: |
42+
ghcr.io/cubecoders/amp:${{ matrix.base }}
43+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.base }}
44+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.base }}
45+
provenance: mode=max
46+
sbom: true
47+
48+
concurrency:
49+
group: ${{ github.workflow }}-${{ github.ref }}
50+
cancel-in-progress: false

.github/workflows/java.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: build java
2+
on:
3+
workflow_dispatch:
4+
workflow_run:
5+
workflows: ['base.yml']
6+
types: [completed]
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- java/**
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
jobs:
20+
check_changes:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
only_java: ${{ steps.filter.outputs.only_java || 'false' }}
24+
steps:
25+
- if: ${{ github.event_name == 'push' }}
26+
id: filter
27+
uses: dorny/paths-filter@v3
28+
with:
29+
filters: |
30+
only_java:
31+
- 'java/**'
32+
- '!base/**'
33+
- '!scripts/ampstart.sh'
34+
35+
build_and_push:
36+
needs: [check_changes]
37+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'push' && needs.check_changes.outputs.only_java == 'true') || github.event_name == 'workflow_dispatch' ) }}
38+
name: "amp:java-${{ matrix.java }}"
39+
runs-on: ubuntu-latest
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
java:
44+
- lts
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
with:
49+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
50+
51+
- uses: docker/setup-qemu-action@v3
52+
- uses: docker/setup-buildx-action@v3
53+
54+
- uses: docker/login-action@v3
55+
with:
56+
registry: ghcr.io
57+
username: cubecoders
58+
password: ${{ secrets.GITHUB_TOKEN }}
59+
60+
- uses: docker/build-push-action@v6
61+
with:
62+
context: .
63+
file: ./java/${{ matrix.java }}/Dockerfile
64+
platforms: linux/amd64,linux/arm64/v8
65+
push: true
66+
pull: true
67+
tags: ghcr.io/cubecoders/amp:java-${{ matrix.java }}
68+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.java }}
69+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.java }}
70+
provenance: mode=max
71+
sbom: true
72+
73+
concurrency:
74+
group: ${{ github.workflow }}-${{ github.ref }}
75+
cancel-in-progress: false

.github/workflows/mono.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: build mono
2+
on:
3+
workflow_dispatch:
4+
workflow_run:
5+
workflows: ['base.yml']
6+
types: [completed]
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- mono/**
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
jobs:
20+
check_changes:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
only_mono: ${{ steps.filter.outputs.only_mono || 'false' }}
24+
steps:
25+
- if: ${{ github.event_name == 'push' }}
26+
id: filter
27+
uses: dorny/paths-filter@v3
28+
with:
29+
filters: |
30+
only_mono:
31+
- 'mono/**'
32+
- '!base/**'
33+
- '!scripts/ampstart.sh'
34+
35+
build_and_push:
36+
needs: [check_changes]
37+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'push' && needs.check_changes.outputs.only_mono == 'true') || github.event_name == 'workflow_dispatch' ) }}
38+
name: "amp:mono-${{ matrix.mono }}"
39+
runs-on: ubuntu-latest
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
mono:
44+
- latest
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
with:
49+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
50+
51+
- uses: docker/setup-qemu-action@v3
52+
- uses: docker/setup-buildx-action@v3
53+
54+
- uses: docker/login-action@v3
55+
with:
56+
registry: ghcr.io
57+
username: cubecoders
58+
password: ${{ secrets.GITHUB_TOKEN }}
59+
60+
- uses: docker/build-push-action@v6
61+
with:
62+
context: .
63+
file: ./mono/${{ matrix.mono }}/Dockerfile
64+
platforms: linux/amd64,linux/arm64/v8
65+
push: true
66+
pull: true
67+
tags: ghcr.io/cubecoders/amp:mono-${{ matrix.mono }}
68+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.mono }}
69+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.mono }}
70+
provenance: mode=max
71+
sbom: true
72+
73+
concurrency:
74+
group: ${{ github.workflow }}-${{ github.ref }}
75+
cancel-in-progress: false

.github/workflows/python.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: build python
2+
on:
3+
workflow_dispatch:
4+
workflow_run:
5+
workflows: ['base.yml']
6+
types: [completed]
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- python/**
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
jobs:
20+
check_changes:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
only_python: ${{ steps.filter.outputs.only_python || 'false' }}
24+
steps:
25+
- if: ${{ github.event_name == 'push' }}
26+
id: filter
27+
uses: dorny/paths-filter@v3
28+
with:
29+
filters: |
30+
only_python:
31+
- 'python/**'
32+
- '!base/**'
33+
- '!scripts/ampstart.sh'
34+
35+
build_and_push:
36+
needs: [check_changes]
37+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'push' && needs.check_changes.outputs.only_python == 'true') || github.event_name == 'workflow_dispatch' ) }}
38+
name: "amp:python-${{ matrix.python }}"
39+
runs-on: ubuntu-latest
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
python:
44+
- '3'
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
with:
49+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
50+
51+
- uses: docker/setup-qemu-action@v3
52+
- uses: docker/setup-buildx-action@v3
53+
54+
- uses: docker/login-action@v3
55+
with:
56+
registry: ghcr.io
57+
username: cubecoders
58+
password: ${{ secrets.GITHUB_TOKEN }}
59+
60+
- uses: docker/build-push-action@v6
61+
with:
62+
context: .
63+
file: ./python/${{ matrix.python }}/Dockerfile
64+
platforms: linux/amd64,linux/arm64/v8
65+
push: true
66+
pull: true
67+
tags: ghcr.io/cubecoders/amp:python-${{ matrix.python }}
68+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.python }}
69+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.python }}
70+
provenance: mode=max
71+
sbom: true
72+
73+
concurrency:
74+
group: ${{ github.workflow }}-${{ github.ref }}
75+
cancel-in-progress: false

.github/workflows/wine.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: build wine
2+
on:
3+
workflow_dispatch:
4+
workflow_run:
5+
workflows: ['base.yml']
6+
types: [completed]
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- wine/**
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
jobs:
20+
check_changes:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
only_wine: ${{ steps.filter.outputs.only_wine || 'false' }}
24+
steps:
25+
- if: ${{ github.event_name == 'push' }}
26+
id: filter
27+
uses: dorny/paths-filter@v3
28+
with:
29+
filters: |
30+
only_wine:
31+
- 'wine/**'
32+
- '!base/**'
33+
- '!scripts/ampstart.sh'
34+
35+
build_and_push:
36+
needs: [check_changes]
37+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'push' && needs.check_changes.outputs.only_wine == 'true') || github.event_name == 'workflow_dispatch' ) }}
38+
name: "amp:wine-${{ matrix.wine }}"
39+
runs-on: ubuntu-latest
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
wine:
44+
- 9-stable
45+
- 10-stable
46+
- devel
47+
- stable
48+
- staging
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
with:
53+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
54+
55+
# - uses: docker/setup-qemu-action@v3
56+
- uses: docker/setup-buildx-action@v3
57+
58+
- uses: docker/login-action@v3
59+
with:
60+
registry: ghcr.io
61+
username: cubecoders
62+
password: ${{ secrets.GITHUB_TOKEN }}
63+
64+
- uses: docker/build-push-action@v6
65+
with:
66+
context: .
67+
file: ./wine/${{ matrix.wine }}/Dockerfile
68+
platforms: linux/amd64
69+
push: true
70+
pull: true
71+
tags: ghcr.io/cubecoders/amp:wine-${{ matrix.wine }}
72+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.wine }}
73+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.wine }}
74+
provenance: mode=max
75+
sbom: true
76+
77+
concurrency:
78+
group: ${{ github.workflow }}-${{ github.ref }}
79+
cancel-in-progress: false

0 commit comments

Comments
 (0)