From b641664e1a5913ae758c57d6029c666667cfb106 Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Thu, 28 Dec 2023 21:47:42 +0800 Subject: [PATCH] ww --- .github/workflows/ci.yml | 12 +++++++++--- .github/workflows/image_derivatives.yml | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e77494c..65958dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ name: Docker images +run-name: Images CI for "${{ inputs.base_image_tags || github.event.client_payload.base_image_tags }}" on: workflow_dispatch: @@ -10,7 +11,8 @@ on: type: string required: true repository_dispatch: - types: [trigger-workflow] + types: + - trigger-workflow jobs: build_matrix: @@ -23,8 +25,11 @@ jobs: uses: actions/github-script@v7 with: script: | + let input_tags = process.env.BASE_IMAGE_TAGS_WD || process.env.BASE_IMAGE_TAGS_RD + console.log(`Input raw tags: ${input_tags}`) + let matrix = {'include': []} - let tags = process.env.BASE_IMAGE_TAGS.split(',').filter(tag => tag !== '') + let tags = input_tags.split(',').filter(tag => tag !== '') tags.forEach(tag => matrix.include.push({'base_image_tag': tag})) console.log(`matrix:`) @@ -33,7 +38,8 @@ jobs: core.summary.addHeading('Input tags').addCodeBlock(tags.join('\n')).write() env: - BASE_IMAGE_TAGS: ${{ inputs.base_image_tags }} + BASE_IMAGE_TAGS_WD: ${{ inputs.base_image_tags }} + BASE_IMAGE_TAGS_RD: ${{ github.event.client_payload.base_image_tags }} outputs: matrix: ${{ steps.matrix.outputs.matrix }} diff --git a/.github/workflows/image_derivatives.yml b/.github/workflows/image_derivatives.yml index d971e57..76dea2d 100644 --- a/.github/workflows/image_derivatives.yml +++ b/.github/workflows/image_derivatives.yml @@ -19,7 +19,7 @@ jobs: uses: ./.github/workflows/image_one.yml secrets: inherit with: - job_name: Extra image + job_name: Extra packages dockerfile_name: Dockerfile-extra build_args: |- BASE_IMAGE=mcdreforged/mcdreforged:${{ inputs.source_tag }} @@ -37,7 +37,7 @@ jobs: uses: ./.github/workflows/image_one.yml secrets: inherit with: - job_name: OpenJDK image (${{ matrix.java }}, ${{ matrix.distribution }}, ${{ matrix.extra }}) + job_name: OpenJDK (jdk${{ matrix.java }}, ${{ matrix.distribution }}${{ ', extra' && matrix.extra == 'true' || '' }}) dockerfile_name: Dockerfile-${{ matrix.distribution }} build_args: |- BASE_IMAGE=mcdreforged/${{ matrix.extra == 'true' && 'mcdreforged-extra' || 'mcdreforged' }}:${{ inputs.source_tag }}