Skip to content

Commit 5796289

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

File tree

16 files changed

+697
-0
lines changed

16 files changed

+697
-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: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
- if: ${{ github.event_name == 'push' }}
30+
id: filter
31+
uses: dorny/paths-filter@v3
32+
with:
33+
filters: |
34+
only_java:
35+
- 'java/**'
36+
- '!base/**'
37+
- '!scripts/ampstart.sh'
38+
39+
build_and_push:
40+
needs: [check_changes]
41+
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' ) }}
42+
name: "amp:java-${{ matrix.java }}"
43+
runs-on: ubuntu-latest
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
java:
48+
- lts
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: ./java/${{ matrix.java }}/Dockerfile
68+
platforms: linux/amd64,linux/arm64/v8
69+
push: true
70+
pull: true
71+
tags: ghcr.io/cubecoders/amp:java-${{ matrix.java }}
72+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.java }}
73+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.java }}
74+
provenance: mode=max
75+
sbom: true
76+
77+
concurrency:
78+
group: ${{ github.workflow }}-${{ github.ref }}
79+
cancel-in-progress: false

.github/workflows/mono.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
- if: ${{ github.event_name == 'push' }}
30+
id: filter
31+
uses: dorny/paths-filter@v3
32+
with:
33+
filters: |
34+
only_mono:
35+
- 'mono/**'
36+
- '!base/**'
37+
- '!scripts/ampstart.sh'
38+
39+
build_and_push:
40+
needs: [check_changes]
41+
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' ) }}
42+
name: "amp:mono-${{ matrix.mono }}"
43+
runs-on: ubuntu-latest
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
mono:
48+
- latest
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: ./mono/${{ matrix.mono }}/Dockerfile
68+
platforms: linux/amd64,linux/arm64/v8
69+
push: true
70+
pull: true
71+
tags: ghcr.io/cubecoders/amp:mono-${{ matrix.mono }}
72+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.mono }}
73+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.mono }}
74+
provenance: mode=max
75+
sbom: true
76+
77+
concurrency:
78+
group: ${{ github.workflow }}-${{ github.ref }}
79+
cancel-in-progress: false

.github/workflows/python.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
- if: ${{ github.event_name == 'push' }}
30+
id: filter
31+
uses: dorny/paths-filter@v3
32+
with:
33+
filters: |
34+
only_python:
35+
- 'python/**'
36+
- '!base/**'
37+
- '!scripts/ampstart.sh'
38+
39+
build_and_push:
40+
needs: [check_changes]
41+
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' ) }}
42+
name: "amp:python-${{ matrix.python }}"
43+
runs-on: ubuntu-latest
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
python:
48+
- '3'
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: ./python/${{ matrix.python }}/Dockerfile
68+
platforms: linux/amd64,linux/arm64/v8
69+
push: true
70+
pull: true
71+
tags: ghcr.io/cubecoders/amp:python-${{ matrix.python }}
72+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.python }}
73+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.python }}
74+
provenance: mode=max
75+
sbom: true
76+
77+
concurrency:
78+
group: ${{ github.workflow }}-${{ github.ref }}
79+
cancel-in-progress: false

.github/workflows/wine.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
- if: ${{ github.event_name == 'push' }}
30+
id: filter
31+
uses: dorny/paths-filter@v3
32+
with:
33+
filters: |
34+
only_wine:
35+
- 'wine/**'
36+
- '!base/**'
37+
- '!scripts/ampstart.sh'
38+
39+
build_and_push:
40+
needs: [check_changes]
41+
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' ) }}
42+
name: "amp:wine-${{ matrix.wine }}"
43+
runs-on: ubuntu-latest
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
wine:
48+
- 9-stable
49+
- 10-stable
50+
- devel
51+
- stable
52+
- staging
53+
54+
steps:
55+
- uses: actions/checkout@v4
56+
with:
57+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
58+
59+
# - uses: docker/setup-qemu-action@v3
60+
- uses: docker/setup-buildx-action@v3
61+
62+
- uses: docker/login-action@v3
63+
with:
64+
registry: ghcr.io
65+
username: cubecoders
66+
password: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- uses: docker/build-push-action@v6
69+
with:
70+
context: .
71+
file: ./wine/${{ matrix.wine }}/Dockerfile
72+
platforms: linux/amd64
73+
push: true
74+
pull: true
75+
tags: ghcr.io/cubecoders/amp:wine-${{ matrix.wine }}
76+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.wine }}
77+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.wine }}
78+
provenance: mode=max
79+
sbom: true
80+
81+
concurrency:
82+
group: ${{ github.workflow }}-${{ github.ref }}
83+
cancel-in-progress: false

0 commit comments

Comments
 (0)