Skip to content

Commit

Permalink
ww
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallen-Breath committed Dec 28, 2023
1 parent b0e364b commit 3bddce4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
type: string
required: true
repository_dispatch:
types: [trigger-workflow]
types:
- trigger-workflow

jobs:
build_matrix:
Expand All @@ -23,8 +24,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:`)
Expand All @@ -33,7 +37,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.ref.base_image_tags }}

outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/image_derivatives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down

0 comments on commit 3bddce4

Please sign in to comment.