diff --git a/.github/workflows/build_files.yml b/.github/workflows/build_files.yml index 16e9c344b..3e2587be7 100644 --- a/.github/workflows/build_files.yml +++ b/.github/workflows/build_files.yml @@ -29,9 +29,11 @@ jobs: - name: Run variables_files.py run: python3 build/variables_files.py "${{ env.VARIABLES_FILES }}" + if: env.VARIABLES_FILES != '' - name: Run compose_files.py run: python3 build/compose_files.py "${{ env.COMPOSE_FILES }}" + if: env.COMPOSE_FILES != '' - name: Commit and push if changed uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/apps/activemq/docker-compose-artemis.yml b/apps/activemq/docker-compose-artemis.yml index 8c6a58c91..0c9102c5f 100644 --- a/apps/activemq/docker-compose-artemis.yml +++ b/apps/activemq/docker-compose-artemis.yml @@ -1,4 +1,4 @@ -# only for artemis Activemq +# only for artemis activemq version: "3.8" diff --git a/apps/activemq/docker-compose-classic.yml b/apps/activemq/docker-compose-classic.yml index 38045fc49..8049a6498 100644 --- a/apps/activemq/docker-compose-classic.yml +++ b/apps/activemq/docker-compose-classic.yml @@ -1,4 +1,4 @@ -# only for classic Activemq +# only for classic activemq version: "3.8" services: diff --git a/build/compose_files.py b/build/compose_files.py index d1ab75f8d..fac43f897 100644 --- a/build/compose_files.py +++ b/build/compose_files.py @@ -20,10 +20,11 @@ name_part = basename.split('-')[2].split('.')[0] # 从 'docker-compose-*.yml' 中提取 '*' # 构造新的文件名 - new_filename = os.path.join(directory, f'docker-compose-{name_part}-merged.yml') + new_filename = os.path.join(directory, f'{name_part}.yml') # 构造 docker-compose 命令 - cmd = ['docker-compose', '-f', 'docker-compose.yml', '-f', filename, 'config', '>', new_filename] + docker_compose_file = os.path.join(directory, 'docker-compose.yml') + cmd = ['docker-compose', '-f', docker_compose_file, '-f', filename, 'config', '>', new_filename] # 执行命令 subprocess.run(' '.join(cmd), shell=True, check=True)