Skip to content

Images CI for "dev-py3.11,dev" ref N/A #29

Images CI for "dev-py3.11,dev" ref N/A

Images CI for "dev-py3.11,dev" ref N/A #29

Workflow file for this run

name: Docker images
run-name: Images CI for "${{ inputs.base_image_tags || github.event.client_payload.base_image_tags }}" ref ${{ github.event.client_payload.git_ref || 'N/A' }}
on:
workflow_dispatch:
inputs:
base_image_tags:
description: |
List of image tags of the mcdreforged/mcdreforged image for the workflow to build as the base images, separated with ",".
For example: "1.2.3,1.2.3-slim,1.2.3-py3.11,1.2.3-py3.11-slim"
type: string
required: true
repository_dispatch:
types:
- trigger-workflow
jobs:
build_matrix:
name: Build matrix from input
runs-on: ubuntu-latest
steps:
- name: Build matrix
id: matrix
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 = input_tags.split(',').filter(tag => tag !== '')
tags.forEach(tag => matrix.include.push({'base_image_tag': tag}))
console.log(`matrix:`)
console.log(JSON.stringify(matrix, null, 2))
core.setOutput('matrix', JSON.stringify(matrix))
core.summary.addHeading('Input tags').addCodeBlock(tags.join('\n')).write()
env:
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 }}
images:
needs: build_matrix
strategy:
matrix: ${{ fromJson(needs.build_matrix.outputs.matrix) }}
uses: ./.github/workflows/image_derivatives.yml
secrets: inherit
with:
source_tag: ${{ matrix.base_image_tag }}