oci-images/.forgejo/workflows/build_nextcloud.yml
Max db0d8aaffd
Some checks failed
Build Nextcloud / get-versions (push) Failing after 0s
automatically build newer nextcloud versions when they have ripened half a year
2026-08-23 21:18:09 +02:00

78 lines
2.9 KiB
YAML

name: Build Nextcloud
on:
workflow_dispatch: {}
push:
paths:
- '.forgejo/workflows/build_nextcloud.yml'
- 'nextcloud/**'
schedule:
- cron: "@daily"
jobs:
get-versions:
runs-on: docker
container:
image: docker.io/library/python:3.14-slim
outputs:
versions: ${{ steps.matrix.outputs.versions }}
steps:
- name: Checkout source code
uses: actions/checkout@v7
- name: Generate Nextcloud version matrix
id: matrix
shell: sh
run: python3 ${{ forgejo.workspace }}/nextcloud/get_versions_to_be_built.py
build-container:
name: Build Nextcloud ${{ matrix.nextcloud-version }} Image
runs-on: docker
container:
image: ghcr.io/osscontainertools/kaniko:alpine
strategy:
matrix:
nextcloud-version: ${{ fromJSON(needs.generate-matrix.outputs.versions) }}
steps:
- name: Install required system packages
run: apk add --no-cache nodejs git
- name: Checkout source code
uses: actions/checkout@v7
- name: Checkout nextcloud/docker
run: git clone --depth 1 https://github.com/nextcloud/docker.git nextcloud-docker
- name: Build base Nextcloud image
env:
KANIKO_NO_PUSH: ${{ forgejo.ref_name != 'main' }}
KANIKO_GIT_HAMBURG_CCC_DE_USER: forgejo-actions
KANIKO_GIT_HAMBURG_CCC_DE_PASSWORD: ${{ secrets.PACKAGES_TOKEN }}
run: /kaniko/executor
--dockerfile="${{ forgejo.workspace }}/nextcloud-docker/${{ matrix.nextcloud-version }}/apache/Dockerfile"
--context="dir://${{ forgejo.workspace }}/nextcloud-docker/${{ matrix.nextcloud-version }}/apache"
--build-arg=TAG=${{ matrix.nextcloud-version }}
--destination=git.hamburg.ccc.de/ccchh/oci-images/nextcloud-base:${{ matrix.nextcloud-version }}
--no-push-cache
--credential-helpers=env
--annotation=org.opencontainers.image.ref.name=nextcloud-base
--annotation=org.opencontainers.image.source=${{ forgejo.server_url }}/${{ forgejo.repository }}
- name: Build extended image
env:
KANIKO_NO_PUSH: ${{ forgejo.ref_name != 'main' }}
KANIKO_GIT_HAMBURG_CCC_DE_USER: forgejo-actions
KANIKO_GIT_HAMBURG_CCC_DE_PASSWORD: ${{ secrets.PACKAGES_TOKEN }}
run: /kaniko/executor
--dockerfile="${{ forgejo.workspace }}/nextcloud/Containerfile"
--context="dir://${{ forgejo.workspace }}/nextcloud"
--build-arg=TAG=${{ matrix.nextcloud-version }}
--destination=git.hamburg.ccc.de/ccchh/oci-images/nextcloud:${{ matrix.nextcloud-version }}
--no-push-cache
--credential-helpers=env
--annotation=org.opencontainers.image.ref.name=nextcloud
--annotation=org.opencontainers.image.url=${{ forgejo.server_url }}/${{ forgejo.repository }}
--annotation=org.opencontainers.image.source=${{ forgejo.server_url }}/${{ forgejo.repository }}