Skip to content

Commit 693a4fe

Browse files
committed
Fix workflow dependencies
1 parent a85804f commit 693a4fe

6 files changed

Lines changed: 91 additions & 55 deletions

File tree

.github/workflows/base.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
push: true
4141
tags: |
4242
ghcr.io/cubecoders/amp:${{ matrix.base }}
43-
cache-from: type=gha
44-
cache-to: type=gha,mode=max
43+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.base }}
44+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.base }}
4545
provenance: mode=max
4646
sbom: true
4747

.github/workflows/java.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,59 @@
11
name: build java
22
on:
33
workflow_dispatch:
4-
schedule:
5-
- cron: "0 0 * * 1"
4+
workflow_run:
5+
workflows: [".github/workflows/base.yml"]
6+
types: [completed]
7+
branches:
8+
- master
69
push:
710
branches:
811
- master
912
paths:
10-
- base/debian/**
1113
- java/**
12-
- scripts/ampstart.sh
13-
permissions:
14+
15+
permissions:
1416
contents: read
1517
packages: write
1618

1719
jobs:
1820
push:
19-
if: ${{ github.repository_owner == 'CubeCoders' }}
21+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) }}
2022
name: "amp:java-${{ matrix.java }}"
2123
runs-on: ubuntu-latest
2224
strategy:
2325
fail-fast: false
2426
matrix:
2527
java:
2628
- lts
29+
2730
steps:
2831
- uses: actions/checkout@v4
32+
with:
33+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
34+
2935
- uses: docker/setup-qemu-action@v3
3036
- uses: docker/setup-buildx-action@v3
37+
3138
- uses: docker/login-action@v3
3239
with:
3340
registry: ghcr.io
3441
username: cubecoders
3542
password: ${{ secrets.GITHUB_TOKEN }}
43+
3644
- uses: docker/build-push-action@v6
3745
with:
3846
context: .
3947
file: ./java/${{ matrix.java }}/Dockerfile
4048
platforms: linux/amd64,linux/arm64/v8
4149
push: true
42-
tags: |
43-
ghcr.io/cubecoders/amp:java-${{ matrix.java }}
44-
cache-from: type=gha
45-
cache-to: type=gha,mode=max
50+
pull: true
51+
tags: ghcr.io/cubecoders/amp:java-${{ matrix.java }}
52+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.java }}
53+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.java }}
4654
provenance: mode=max
4755
sbom: true
4856

4957
concurrency:
5058
group: ${{ github.workflow }}-${{ github.ref }}
51-
cancel-in-progress: false
59+
cancel-in-progress: false

.github/workflows/mono.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,59 @@
11
name: build mono
22
on:
33
workflow_dispatch:
4-
schedule:
5-
- cron: "0 0 * * 1"
4+
workflow_run:
5+
workflows: [".github/workflows/base.yml"]
6+
types: [completed]
7+
branches:
8+
- master
69
push:
710
branches:
811
- master
912
paths:
10-
- base/debian/**
1113
- mono/**
12-
- scripts/ampstart.sh
13-
permissions:
14+
15+
permissions:
1416
contents: read
1517
packages: write
1618

1719
jobs:
1820
push:
19-
if: ${{ github.repository_owner == 'CubeCoders' }}
21+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) }}
2022
name: "amp:mono-${{ matrix.mono }}"
2123
runs-on: ubuntu-latest
2224
strategy:
2325
fail-fast: false
2426
matrix:
2527
mono:
2628
- latest
29+
2730
steps:
2831
- uses: actions/checkout@v4
32+
with:
33+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
34+
2935
- uses: docker/setup-qemu-action@v3
3036
- uses: docker/setup-buildx-action@v3
37+
3138
- uses: docker/login-action@v3
3239
with:
3340
registry: ghcr.io
3441
username: cubecoders
3542
password: ${{ secrets.GITHUB_TOKEN }}
43+
3644
- uses: docker/build-push-action@v6
3745
with:
3846
context: .
3947
file: ./mono/${{ matrix.mono }}/Dockerfile
4048
platforms: linux/amd64,linux/arm64/v8
4149
push: true
42-
tags: |
43-
ghcr.io/cubecoders/amp:mono-${{ matrix.mono }}
44-
cache-from: type=gha
45-
cache-to: type=gha,mode=max
50+
pull: true
51+
tags: ghcr.io/cubecoders/amp:mono-${{ matrix.mono }}
52+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.mono }}
53+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.mono }}
4654
provenance: mode=max
4755
sbom: true
4856

4957
concurrency:
5058
group: ${{ github.workflow }}-${{ github.ref }}
51-
cancel-in-progress: false
59+
cancel-in-progress: false

.github/workflows/python.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,59 @@
11
name: build python
22
on:
33
workflow_dispatch:
4-
schedule:
5-
- cron: "0 0 * * 1"
4+
workflow_run:
5+
workflows: [".github/workflows/base.yml"]
6+
types: [completed]
7+
branches:
8+
- master
69
push:
710
branches:
811
- master
912
paths:
10-
- base/debian/**
1113
- python/**
12-
- scripts/ampstart.sh
13-
permissions:
14+
15+
permissions:
1416
contents: read
1517
packages: write
1618

1719
jobs:
1820
push:
19-
if: ${{ github.repository_owner == 'CubeCoders' }}
21+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) }}
2022
name: "amp:python-${{ matrix.python }}"
2123
runs-on: ubuntu-latest
2224
strategy:
2325
fail-fast: false
2426
matrix:
2527
python:
2628
- "3"
29+
2730
steps:
2831
- uses: actions/checkout@v4
32+
with:
33+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
34+
2935
- uses: docker/setup-qemu-action@v3
3036
- uses: docker/setup-buildx-action@v3
37+
3138
- uses: docker/login-action@v3
3239
with:
3340
registry: ghcr.io
3441
username: cubecoders
3542
password: ${{ secrets.GITHUB_TOKEN }}
43+
3644
- uses: docker/build-push-action@v6
3745
with:
3846
context: .
3947
file: ./python/${{ matrix.python }}/Dockerfile
4048
platforms: linux/amd64,linux/arm64/v8
4149
push: true
42-
tags: |
43-
ghcr.io/cubecoders/amp:python-${{ matrix.python }}
44-
cache-from: type=gha
45-
cache-to: type=gha,mode=max
50+
pull: true
51+
tags: ghcr.io/cubecoders/amp:python-${{ matrix.python }}
52+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.python }}
53+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.python }}
4654
provenance: mode=max
4755
sbom: true
4856

4957
concurrency:
5058
group: ${{ github.workflow }}-${{ github.ref }}
51-
cancel-in-progress: false
59+
cancel-in-progress: false

.github/workflows/wine.yml

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,63 @@
1-
name: build mono
1+
name: build wine
22
on:
33
workflow_dispatch:
4-
schedule:
5-
- cron: "0 0 * * 1"
4+
workflow_run:
5+
workflows: [".github/workflows/base.yml"]
6+
types: [completed]
7+
branches:
8+
- master
69
push:
710
branches:
811
- master
912
paths:
10-
- base/debian/**
11-
- mono/**
12-
- scripts/ampstart.sh
13-
permissions:
13+
- wine/**
14+
15+
permissions:
1416
contents: read
1517
packages: write
1618

1719
jobs:
1820
push:
19-
if: ${{ github.repository_owner == 'CubeCoders' }}
20-
name: "amp:${{ matrix.mono }}"
21+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) }}
22+
name: "amp:wine-${{ matrix.wine }}"
2123
runs-on: ubuntu-latest
2224
strategy:
2325
fail-fast: false
2426
matrix:
25-
mono:
26-
- latest
27+
wine:
28+
- 9-stable
29+
- 10-stable
30+
- devel
31+
- stable
32+
- staging
33+
2734
steps:
2835
- uses: actions/checkout@v4
29-
- uses: docker/setup-qemu-action@v3
36+
with:
37+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
38+
39+
# - uses: docker/setup-qemu-action@v3
3040
- uses: docker/setup-buildx-action@v3
41+
3142
- uses: docker/login-action@v3
3243
with:
3344
registry: ghcr.io
3445
username: cubecoders
3546
password: ${{ secrets.GITHUB_TOKEN }}
47+
3648
- uses: docker/build-push-action@v6
3749
with:
3850
context: .
39-
file: ./mono/${{ matrix.mono }}/Dockerfile
40-
platforms: linux/amd64,linux/arm64/v8
51+
file: ./wine/${{ matrix.wine }}/Dockerfile
52+
platforms: linux/amd64
4153
push: true
42-
tags: |
43-
ghcr.io/cubecoders/amp:${{ matrix.mono }}
44-
cache-from: type=gha
45-
cache-to: type=gha,mode=max
54+
pull: true
55+
tags: ghcr.io/cubecoders/amp:wine-${{ matrix.wine }}
56+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.wine }}
57+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.wine }}
4658
provenance: mode=max
4759
sbom: true
4860

4961
concurrency:
5062
group: ${{ github.workflow }}-${{ github.ref }}
51-
cancel-in-progress: false
63+
cancel-in-progress: false

base/debian/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN mkdir -p /usr/share/man/man1 && \
1717
apt-get update && \
1818
apt-get install -y --no-install-recommends \
1919
ca-certificates software-properties-common curl wget tar unzip xz-utils bzip2 \
20-
coreutils procps net-tools iproute2 inetutils-ping socat jq git git-lfs gnupg lsof tmux sqlite3 gdb \
20+
coreutils procps net-tools iproute2 iputils-ping socat jq git git-lfs gnupg lsof tmux sqlite3 gdb \
2121
tini tzdata locales \
2222
xvfb xauth libxi6 \
2323
libc6 libc++1 libc++abi1 libcurl4 libatomic1 libpulse-dev liblua5.3-0 libfontconfig1 libgdiplus libsqlite3-0 libzstd1 libsdl2-2.0-0 libsdl1.2debian libssl-dev && \

0 commit comments

Comments
 (0)