Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ff857cf90a | |||
| 8ce6435aae | |||
| a888fdd7a6 | |||
| d52d7bf11c | |||
| c982161ef8 |
@@ -10,39 +10,29 @@ on:
|
||||
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
build:
|
||||
name: Build image
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'juliushaertl/nextcloud-docker-dev'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
container:
|
||||
- php83
|
||||
- php82
|
||||
- php81
|
||||
- php80
|
||||
- php74
|
||||
- php73
|
||||
- php72
|
||||
- php71
|
||||
- push
|
||||
- saml
|
||||
- nginx
|
||||
- elasticsearch
|
||||
- mailhog
|
||||
- ldap
|
||||
- lookupserver
|
||||
- smb
|
||||
- codedev
|
||||
- code
|
||||
- talk-janus
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: nextcloud-dev-${{ matrix.container }}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
@@ -73,27 +63,64 @@ jobs:
|
||||
with:
|
||||
push: false
|
||||
context: docker/
|
||||
platforms: linux/amd64,linux/arm64
|
||||
platforms: ${{ matrix.platform }}
|
||||
file: ${{ steps.dockerfile.outputs.DOCKERFILE }}
|
||||
tags: |
|
||||
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
- name: Push container image
|
||||
outputs: type=image,name=ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }},push-by-digest=true,name-canonical=true,push=true
|
||||
- name: Build and push by digest
|
||||
id: build
|
||||
uses: docker/build-push-action@v5
|
||||
if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
push: true
|
||||
context: docker/
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: ${{ steps.dockerfile.outputs.DOCKERFILE }}
|
||||
tags: |
|
||||
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
- name: Move cache
|
||||
context: .
|
||||
platforms: ${{ matrix.platform }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
- name: Export digest
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
mkdir -p /tmp/digests
|
||||
digest="${{ steps.build.outputs.digest }}"
|
||||
touch "/tmp/digests/${digest#sha256:}"
|
||||
- name: Upload digest
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: digests
|
||||
path: /tmp/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build
|
||||
strategy:
|
||||
matrix:
|
||||
container:
|
||||
- php80
|
||||
steps:
|
||||
- name: Download digests
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: digests
|
||||
path: /tmp/digests
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: nextcloud-dev-${{ matrix.container }}
|
||||
- name: Login to GitHub Container Registry
|
||||
if: needs.prepare.outputs.push == 'true'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Create manifest list and push
|
||||
working-directory: /tmp/digests
|
||||
run: |
|
||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
||||
- name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ steps.meta.outputs.name }} :${{ steps.meta.outputs.version }}
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ RUN install-php-extensions \
|
||||
redis \
|
||||
smbclient \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
xdebug-^3.2 \
|
||||
zip \
|
||||
@composer
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ RUN install-php-extensions \
|
||||
redis \
|
||||
smbclient \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
xdebug-^3.2 \
|
||||
zip \
|
||||
@composer
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ RUN install-php-extensions \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
imagick \
|
||||
# waiting for https://github.com/mlocati/docker-php-extension-installer/pull/811
|
||||
# imagick \
|
||||
intl \
|
||||
ldap \
|
||||
oci8 \
|
||||
@@ -22,7 +23,7 @@ RUN install-php-extensions \
|
||||
redis \
|
||||
smbclient \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
# xdebug \
|
||||
zip \
|
||||
@composer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user