mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
Merge remote-tracking branch 'origin/main' into fix/secret-manager-request-timeout
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
# Temporary: releases the 4.0 to 4.3 security fixes from the v4.0.x to v4.3.x branches without moving latest.
|
||||
# Delete this workflow once 4.5 ships.
|
||||
name: TMP Release Coolify Hotfix
|
||||
run-name: tmp ${{ inputs.branch }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: Release line branch
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- v4.3.x
|
||||
- v4.2.x
|
||||
- v4.1.x
|
||||
- v4.0.x
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: tmp-coolify-hotfix-release
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
GITHUB_REGISTRY: ghcr.io
|
||||
DOCKER_REGISTRY: docker.io
|
||||
IMAGE_NAME: coollabsio/coolify
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: read
|
||||
outputs:
|
||||
sha: ${{ steps.version.outputs.sha }}
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Resolve version
|
||||
id: version
|
||||
env:
|
||||
BRANCH: ${{ inputs.branch }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
VERSION=$(docker run --rm -v "$(pwd):/app" -w /app php:8.2-alpine3.16 php bootstrap/getVersion.php)
|
||||
if [[ "${VERSION}" != "${BRANCH:1:3}."* || ! "${VERSION}" =~ ^4\.[0-3]\.[0-9]+$ ]]; then
|
||||
echo "Version ${VERSION} does not belong to ${BRANCH}."
|
||||
exit 1
|
||||
fi
|
||||
if gh release view "v${VERSION}" --repo "${GITHUB_REPOSITORY}" > /dev/null 2>&1; then
|
||||
echo "Release v${VERSION} already exists."
|
||||
exit 1
|
||||
fi
|
||||
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
build:
|
||||
needs: validate
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- arch: amd64
|
||||
platform: linux/amd64
|
||||
runner: ubuntu-24.04
|
||||
- arch: aarch64
|
||||
platform: linux/aarch64
|
||||
runner: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
ref: ${{ needs.validate.outputs.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Login to ${{ env.GITHUB_REGISTRY }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.GITHUB_REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to ${{ env.DOCKER_REGISTRY }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.DOCKER_REGISTRY }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push image (${{ matrix.arch }})
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: docker/production/Dockerfile
|
||||
platforms: ${{ matrix.platform }}
|
||||
push: true
|
||||
build-args: |
|
||||
COOLIFY_VERSION=${{ needs.validate.outputs.version }}
|
||||
labels: |
|
||||
org.opencontainers.image.revision=${{ needs.validate.outputs.sha }}
|
||||
tags: |
|
||||
${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:release-${{ needs.validate.outputs.version }}-${{ needs.validate.outputs.sha }}-${{ matrix.arch }}
|
||||
${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:release-${{ needs.validate.outputs.version }}-${{ needs.validate.outputs.sha }}-${{ matrix.arch }}
|
||||
|
||||
publish:
|
||||
needs: [validate, build]
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
steps:
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to ${{ env.GITHUB_REGISTRY }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.GITHUB_REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to ${{ env.DOCKER_REGISTRY }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.DOCKER_REGISTRY }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Publish the version tag
|
||||
env:
|
||||
VERSION: ${{ needs.validate.outputs.version }}
|
||||
SHA: ${{ needs.validate.outputs.sha }}
|
||||
run: |
|
||||
for REGISTRY in "${GITHUB_REGISTRY}" "${DOCKER_REGISTRY}"; do
|
||||
IMAGE="${REGISTRY}/${IMAGE_NAME}"
|
||||
docker buildx imagetools create \
|
||||
"${IMAGE}:release-${VERSION}-${SHA}-amd64" \
|
||||
"${IMAGE}:release-${VERSION}-${SHA}-aarch64" \
|
||||
--tag "${IMAGE}:${VERSION}"
|
||||
done
|
||||
|
||||
- name: Publish the GitHub release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
VERSION: ${{ needs.validate.outputs.version }}
|
||||
SHA: ${{ needs.validate.outputs.sha }}
|
||||
run: |
|
||||
gh release create "v${VERSION}" \
|
||||
--repo "${GITHUB_REPOSITORY}" \
|
||||
--target "${SHA}" \
|
||||
--title "v${VERSION}" \
|
||||
--latest=false \
|
||||
--notes "Security fix release for Coolify ${VERSION%.*}. Apply it with: curl -fsSL https://cdn.coollabs.io/coolify/patch.sh | sudo bash"
|
||||
@@ -0,0 +1,134 @@
|
||||
# Temporary: builds PHP from the signed php.net release and rebuilds serversideup/php v4.5.1 on it for the 4.x security fixes.
|
||||
# Delete this workflow and docker/tmp-php once 4.5 ships on serversideup/php v5.
|
||||
name: TMP Build Patched PHP Base
|
||||
run-name: tmp php ${{ inputs.php_version }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
php_version:
|
||||
description: Patched PHP 8.4 release, for example 8.4.27
|
||||
required: true
|
||||
type: string
|
||||
php_sha256:
|
||||
description: SHA256 of php-<version>.tar.xz from https://www.php.net/downloads.php
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
concurrency:
|
||||
group: tmp-php-base-image
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
GITHUB_REGISTRY: ghcr.io
|
||||
PHP_IMAGE: ghcr.io/coollabsio/php
|
||||
BASE_IMAGE: ghcr.io/coollabsio/serversideup-php
|
||||
# serversideup/docker-php v4.5.1
|
||||
SERVERSIDEUP_CONTEXT: https://github.com/serversideup/docker-php.git#92b16c9ee63bde4f75cdcc7ebe96aee36a896f88
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- arch: amd64
|
||||
platform: linux/amd64
|
||||
runner: ubuntu-24.04
|
||||
- arch: aarch64
|
||||
platform: linux/aarch64
|
||||
runner: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- name: Validate inputs
|
||||
env:
|
||||
PHP_VERSION: ${{ inputs.php_version }}
|
||||
PHP_SHA256: ${{ inputs.php_sha256 }}
|
||||
run: |
|
||||
if [[ ! "${PHP_VERSION}" =~ ^8\.4\.[0-9]+$ ]]; then
|
||||
echo "Unsupported PHP version: ${PHP_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! "${PHP_SHA256}" =~ ^[0-9a-f]{64}$ ]]; then
|
||||
echo "Invalid SHA256: ${PHP_SHA256}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Login to ${{ env.GITHUB_REGISTRY }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.GITHUB_REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build PHP from the signed release (${{ matrix.arch }})
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: docker/tmp-php
|
||||
platforms: ${{ matrix.platform }}
|
||||
push: true
|
||||
build-args: |
|
||||
PHP_VERSION=${{ inputs.php_version }}
|
||||
PHP_SHA256=${{ inputs.php_sha256 }}
|
||||
tags: ${{ env.PHP_IMAGE }}:${{ inputs.php_version }}-fpm-alpine3.24-${{ matrix.arch }}
|
||||
|
||||
- name: Rebuild serversideup/php v4.5.1 on it (${{ matrix.arch }})
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ${{ env.SERVERSIDEUP_CONTEXT }}
|
||||
file: src/variations/fpm-nginx/Dockerfile
|
||||
platforms: ${{ matrix.platform }}
|
||||
push: true
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ env.PHP_IMAGE }}:${{ inputs.php_version }}-fpm-alpine3.24-${{ matrix.arch }}
|
||||
PHP_VERSION=8.4
|
||||
BASE_OS_VERSION=alpine3.24
|
||||
PHP_VARIATION=fpm-nginx
|
||||
NGINX_VERSION=1.30.4-r1
|
||||
REPOSITORY_BUILD_VERSION=v4.5.1-php${{ inputs.php_version }}
|
||||
tags: ${{ env.BASE_IMAGE }}:${{ inputs.php_version }}-fpm-nginx-alpine-v4.5.1-${{ matrix.arch }}
|
||||
|
||||
- name: Check the PHP version (${{ matrix.arch }})
|
||||
env:
|
||||
IMAGE: ${{ env.BASE_IMAGE }}:${{ inputs.php_version }}-fpm-nginx-alpine-v4.5.1-${{ matrix.arch }}
|
||||
PHP_VERSION: ${{ inputs.php_version }}
|
||||
run: |
|
||||
BUILT_VERSION=$(docker run --rm --entrypoint php "${IMAGE}" -r 'echo PHP_VERSION;')
|
||||
if [ "${BUILT_VERSION}" != "${PHP_VERSION}" ]; then
|
||||
echo "The base image runs PHP ${BUILT_VERSION}, expected ${PHP_VERSION}."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
publish:
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to ${{ env.GITHUB_REGISTRY }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.GITHUB_REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Publish multi-arch images
|
||||
env:
|
||||
PHP_VERSION: ${{ inputs.php_version }}
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
"${PHP_IMAGE}:${PHP_VERSION}-fpm-alpine3.24-amd64" \
|
||||
"${PHP_IMAGE}:${PHP_VERSION}-fpm-alpine3.24-aarch64" \
|
||||
--tag "${PHP_IMAGE}:${PHP_VERSION}-fpm-alpine3.24"
|
||||
docker buildx imagetools create \
|
||||
"${BASE_IMAGE}:${PHP_VERSION}-fpm-nginx-alpine-v4.5.1-amd64" \
|
||||
"${BASE_IMAGE}:${PHP_VERSION}-fpm-nginx-alpine-v4.5.1-aarch64" \
|
||||
--tag "${BASE_IMAGE}:${PHP_VERSION}-fpm-nginx-alpine-v4.5.1" \
|
||||
--tag "${BASE_IMAGE}:8.4-fpm-nginx-alpine-v4.5.1-hotfix"
|
||||
Reference in New Issue
Block a user