Manual Build Matrix #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Manual Build Matrix | |
on: | |
workflow_dispatch: | |
inputs: | |
flavors: | |
description: "Base images" | |
default: '[ "base", "slim", "alpine" ]' | |
required: false | |
type: choice | |
options: | |
- '[ "base", "slim", "alpine" ]' | |
- '[ "base", "slim" ]' | |
- '[ "base", "alpine" ]' | |
- '[ "slim", "alpine" ]' | |
- '[ "base" ]' | |
- '[ "slim" ]' | |
- '[ "alpine" ]' | |
version: | |
description: "EteBase Version" | |
required: false | |
default: "" | |
type: string | |
platforms: | |
description: "Platforms to build" | |
required: false | |
default: "linux/amd64,linux/arm64" | |
type: choice | |
options: | |
- "linux/amd64,linux/arm64,linux/arm/v7" | |
- "linux/amd64,linux/arm64" | |
- "linux/arm64,linux/arm/v7" | |
- "linux/amd64" | |
- "linux/arm64" | |
- "linux/arm/v7" | |
pushit: | |
description: "Should push?" | |
required: false | |
default: false | |
type: boolean | |
tag: | |
description: "Custom Tag" | |
required: false | |
default: "" | |
type: string | |
jobs: | |
prepare-manual-build: | |
runs-on: ubuntu-latest | |
outputs: | |
ete_version: ${{ steps.get_version.outputs.version }} | |
steps: | |
- name: Checkout Version and Workflow files | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
server_version | |
./.github/actions/ | |
- id: get_version | |
name: Get Server Version | |
uses: ./.github/actions/get-server-version | |
with: | |
version: ${{ github.event.inputs.version }} | |
manual-build-matrix: | |
needs: prepare-manual-build | |
uses: ./.github/workflows/call_build_push.yml | |
strategy: | |
matrix: | |
flavor: ${{ fromJson(github.event.inputs.flavors) }} | |
with: | |
flavor: ${{ matrix.flavor }} | |
version: ${{ needs.prepare-manual-build.outputs.ete_version }} | |
platforms: ${{ github.event.inputs.platforms }} | |
pushit: ${{ github.event.inputs.pushit == 'true' }} | |
tag: ${{ github.event.inputs.tag }} | |
secrets: | |
dckr_username: ${{ secrets.DOCKER_USER }} | |
dckr_token: ${{ secrets.DOCKER_TOKEN }} | |
manual-create-releases: | |
if: inputs.pushit | |
needs: [ prepare-manual-build, manual-build-matrix ] | |
uses: ./.github/workflows/call_release.yml | |
with: | |
version: ${{ needs.prepare-manual-build.outputs.ete_version }} |