diff --git a/.github/workflows/build-php-images.yml b/.github/workflows/build-php-images.yml new file mode 100644 index 0000000..53d72fd --- /dev/null +++ b/.github/workflows/build-php-images.yml @@ -0,0 +1,50 @@ +on: + workflow_call: + inputs: + version: + required: true + type: string + debug: + required: false + type: boolean + default: true + cron: + required: false + type: boolean + default: true + multiarch: + required: false + type: boolean + default: true + +jobs: + build-php-image: + name: Build PHP ${{ inputs.version }} image + uses: ./.github/workflows/build-image.yml + with: + image: php${{ inputs.version }} + context: ./php/php${{ inputs.version }} + multiarch: ${{ inputs.multiarch }} + secrets: inherit + + build-php-debug-image: + name: Build PHP ${{ inputs.version }} debug image + if: ${{ inputs.debug == true }} + needs: build-php-image + uses: ./.github/workflows/build-image.yml + with: + image: php${{ inputs.version }}-debug + context: ./php/php${{ inputs.version }}-debug + multiarch: ${{ inputs.multiarch }} + secrets: inherit + + build-php-cron-image: + name: Build cron image + if: ${{ inputs.cron == true }} + needs: build-php-image + uses: ./.github/workflows/build-image.yml + with: + image: php${{ inputs.version }}-cron + context: ./php/php${{ inputs.version }}-cron + multiarch: ${{ inputs.multiarch }} + secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1445e09..e465358 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,37 +36,35 @@ jobs: secrets: inherit build-php-images: - name: Build PHP base images + name: Build PHP images + uses: ./.github/workflows/build-php-images.yml strategy: + fail-fast: false matrix: - version: [53, 54, 55, 56, 70, 71, 72, 73, 80, 81, 82, 83] - uses: ./.github/workflows/build-image.yml + version: [73, 74, 80, 81, 82, 83] with: - image: php${{ matrix.version }} - context: ./php/php${{ matrix.version }} + version: ${{ matrix.version }} secrets: inherit - build-php-debug-images: - name: Build PHP debug images - needs: build-php-images - strategy: - matrix: - version: [53, 54, 55, 56, 70, 71, 72, 73, 80, 81, 82, 83] + build-legacy-php-base-image: + name: Build legacy PHP base image uses: ./.github/workflows/build-image.yml with: - image: php${{ matrix.version }}-debug - context: ./php/php${{ matrix.version }}-debug + image: php-base + context: ./php/base + multiarch: false secrets: inherit - build-php-cron-images: - name: Build PHP cron images - needs: build-php-images + build-legacy-php-images: + name: Build legacy PHP images + needs: build-legacy-php-base-image + uses: ./.github/workflows/build-php-images.yml strategy: + fail-fast: false matrix: - # Note: no cron container for v5.3 - version: [54, 55, 56, 70, 71, 72, 73, 80, 81, 82, 83] - uses: ./.github/workflows/build-image.yml + version: [53, 54, 55, 56, 70, 71, 72] with: - image: php${{ matrix.version }}-cron - context: ./php/php${{ matrix.version }}-cron + version: ${{ matrix.version }} + cron: ${{ matrix.version != 53 }} # 5.3 doesn't have a cron container + multiarch: false secrets: inherit diff --git a/.gitignore b/.gitignore index 156673b..3a61b65 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,7 @@ mutagen.yml.lock /custom/*.yml /custom/*.yaml /tools/.update -.idea/ \ No newline at end of file +.idea/ +.vscode/ +.DS_Store +Thumbs.db diff --git a/compose/php.yml b/compose/php.yml index e2b355c..876102b 100644 --- a/compose/php.yml +++ b/compose/php.yml @@ -12,7 +12,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -34,7 +34,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -52,7 +52,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -74,7 +74,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -104,7 +104,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -126,7 +126,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -156,7 +156,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -178,7 +178,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -208,7 +208,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -230,7 +230,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -260,7 +260,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -282,7 +282,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -312,7 +312,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -335,7 +335,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -365,7 +365,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -388,7 +388,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -418,7 +418,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -441,7 +441,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -470,7 +470,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -493,7 +493,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -520,7 +520,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -553,7 +553,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -570,7 +570,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -603,7 +603,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -620,7 +620,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell depends_on: @@ -653,7 +653,7 @@ services: volumes: - ${LOCAL_SRC}:${REMOTE_SRC} - totara-data:${REMOTE_DATA} - - $HOME/.bash_history:/root/.bash_history + - bash-history:/root/.bash_history - zsh-history:/root/.zsh_history - ./shell:/root/custom_shell networks: @@ -661,4 +661,5 @@ services: volumes: totara-data: + bash-history: zsh-history: