mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2026-01-10 09:54:43 +00:00
112 lines
4.1 KiB
YAML
112 lines
4.1 KiB
YAML
---
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
# Job Name
|
|
# -------------------------------------------------------------------------------------------------
|
|
name: build
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
# When to run
|
|
# -------------------------------------------------------------------------------------------------
|
|
on:
|
|
push:
|
|
|
|
|
|
jobs:
|
|
|
|
# (1/2) Determine repository params
|
|
params:
|
|
uses: ./.github/workflows/aaa-reuse-params.yml
|
|
|
|
configure:
|
|
needs: [params]
|
|
uses: ./.github/workflows/aaa-reuse-configure.yml
|
|
with:
|
|
enabled: true
|
|
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
|
matrix: ${{ needs.params.outputs.matrix }}
|
|
refs: ${{ needs.params.outputs.refs }}
|
|
secrets:
|
|
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
debug:
|
|
needs: [params, configure]
|
|
name: Debug
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "[DEBUG] Show params outputs"
|
|
shell: bash
|
|
run: |
|
|
echo 'matrix=${{ needs.params.outputs.matrix }}'
|
|
echo 'refs=${{ needs.params.outputs.refs }}'
|
|
|
|
- name: "[DEBUG] Show configure outputs"
|
|
shell: bash
|
|
run: |
|
|
echo 'matrix_build=${{ needs.configure.outputs.matrix_build }}'
|
|
echo 'has_refs=${{ needs.configure.outputs.has_refs }}'
|
|
echo 'artifact_prefix=${{ needs.configure.outputs.artifact_prefix }}'
|
|
|
|
# (2/2) Build 'base'
|
|
base:
|
|
needs: [params, configure]
|
|
uses: ./.github/workflows/aaa-reuse-build.yml
|
|
with:
|
|
enabled: true
|
|
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
|
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
|
has_refs: ${{ needs.configure.outputs.has_refs }}
|
|
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
|
flavour: base
|
|
secrets:
|
|
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
# (2/2) Build 'mods'
|
|
mods:
|
|
needs: [params, configure, base]
|
|
uses: ./.github/workflows/aaa-reuse-build.yml
|
|
with:
|
|
enabled: true
|
|
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
|
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
|
has_refs: ${{ needs.configure.outputs.has_refs }}
|
|
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
|
flavour: mods
|
|
secrets:
|
|
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
# (2/2) Build 'mods'
|
|
prod:
|
|
needs: [params, configure, base, mods]
|
|
uses: ./.github/workflows/aaa-reuse-build.yml
|
|
with:
|
|
enabled: true
|
|
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
|
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
|
has_refs: ${{ needs.configure.outputs.has_refs }}
|
|
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
|
flavour: prod
|
|
secrets:
|
|
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
|
|
# (2/2) Build 'mods'
|
|
work:
|
|
needs: [params, configure, base, mods, prod]
|
|
uses: ./.github/workflows/aaa-reuse-build.yml
|
|
with:
|
|
enabled: true
|
|
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
|
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
|
has_refs: ${{ needs.configure.outputs.has_refs }}
|
|
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
|
flavour: work
|
|
secrets:
|
|
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|