split in different steps
This commit is contained in:
parent
76b56114b5
commit
3f997f46aa
1 changed files with 47 additions and 19 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
name: Weekly Docker Image Rebuild
|
name: Weekly Docker Image Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
|
|
@ -22,29 +22,57 @@ jobs:
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push PHP images
|
- name: Setup Docker Buildx
|
||||||
run: |
|
run: |
|
||||||
PHP_VERSIONS="7.4 8.0 8.1 8.2"
|
|
||||||
PLATFORMS="linux/arm64/v8,linux/amd64"
|
|
||||||
|
|
||||||
docker buildx create --use --platform=linux/arm64/v8,linux/amd64 --name multi-platform-builder
|
docker buildx create --use --platform=linux/arm64/v8,linux/amd64 --name multi-platform-builder
|
||||||
docker buildx inspect --bootstrap
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
for PHP_VERSION in ${PHP_VERSIONS}; do
|
- name: Build and push PHP 7.4
|
||||||
echo "Building php:${PHP_VERSION}"
|
run: |
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
--platform=${PLATFORMS} \
|
--platform=linux/arm64/v8,linux/amd64 \
|
||||||
--push \
|
--push \
|
||||||
-f "./Dockerfile-php" \
|
-f "./Dockerfile-php" \
|
||||||
-t "git.paucapo.com/server/php:${PHP_VERSION}" \
|
-t "git.paucapo.com/server/php:7.4" \
|
||||||
--build-arg PHP_VERSION=${PHP_VERSION} \
|
--build-arg PHP_VERSION=7.4 \
|
||||||
.
|
.
|
||||||
done
|
|
||||||
|
|
||||||
docker buildx rm multi-platform-builder --force
|
- name: Build and push PHP 8.0
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--no-cache \
|
||||||
|
--platform=linux/arm64/v8,linux/amd64 \
|
||||||
|
--push \
|
||||||
|
-f "./Dockerfile-php" \
|
||||||
|
-t "git.paucapo.com/server/php:8.0" \
|
||||||
|
--build-arg PHP_VERSION=8.0 \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Build and push PHP 8.1
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--no-cache \
|
||||||
|
--platform=linux/arm64/v8,linux/amd64 \
|
||||||
|
--push \
|
||||||
|
-f "./Dockerfile-php" \
|
||||||
|
-t "git.paucapo.com/server/php:8.1" \
|
||||||
|
--build-arg PHP_VERSION=8.1 \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Build and push PHP 8.2
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--no-cache \
|
||||||
|
--platform=linux/arm64/v8,linux/amd64 \
|
||||||
|
--push \
|
||||||
|
-f "./Dockerfile-php" \
|
||||||
|
-t "git.paucapo.com/server/php:8.2" \
|
||||||
|
--build-arg PHP_VERSION=8.2 \
|
||||||
|
.
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
|
docker buildx rm multi-platform-builder --force
|
||||||
docker image prune -a --force
|
docker image prune -a --force
|
||||||
Loading…
Add table
Add a link
Reference in a new issue