Compare commits

...

5 Commits

Author SHA1 Message Date
waja
004309885d
Merge 35725bd4eb89af3016cace57e7b3a8cbdc57e1bc into aec283db223338e93556ee974d7cb6c6885884d5 2024-03-30 21:30:45 +01:00
aec283db22 chore: update cosign 2024-03-29 15:44:15 +01:00
6b6e52fbdc chore: update Alpine to 3.19 2024-03-29 14:59:30 +01:00
e0cb8643f0 chore: update Nextcloud to 28.0.4 2024-03-29 14:58:29 +01:00
Jan Wagner
35725bd4eb Enhance branch workflow
Allow running CI pipelines on version-branches and still (only) tag latest on
master branch
2023-12-16 15:10:45 +01:00
2 changed files with 16 additions and 8 deletions

View File

@ -3,7 +3,9 @@ name: build
on: on:
workflow_dispatch: workflow_dispatch:
push: push:
branches: [ master ] branches:
- master
- version-*
schedule: schedule:
# Build the image regularly (each Friday) # Build the image regularly (each Friday)
- cron: '23 04 * * 5' - cron: '23 04 * * 5'
@ -27,6 +29,12 @@ jobs:
- name: Extract version for tags - name: Extract version for tags
run: | run: |
if [[ "$GITHUB_REF" == refs/heads/* ]]; then
BRANCH="${GITHUB_REF#refs/heads/}"
if [ "$BRANCH" = "master" ]; then
echo "BRANCH_VERSION=latest" >> $GITHUB_ENV
fi
fi
echo "FULL_VERSION=$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c6)" >> $GITHUB_ENV echo "FULL_VERSION=$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c6)" >> $GITHUB_ENV
echo "MAJOR_VERSION=$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c2)" >> $GITHUB_ENV echo "MAJOR_VERSION=$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c2)" >> $GITHUB_ENV
@ -34,7 +42,7 @@ jobs:
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@main uses: sigstore/cosign-installer@main
with: with:
cosign-release: 'v1.13.1' cosign-release: 'v2.2.2'
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
@ -53,7 +61,7 @@ jobs:
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: | tags: |
latest ${{ env.BRANCH_VERSION }}
${{ env.FULL_VERSION }} ${{ env.FULL_VERSION }}
${{ env.MAJOR_VERSION }} ${{ env.MAJOR_VERSION }}
@ -70,4 +78,4 @@ jobs:
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' }}
env: env:
COSIGN_EXPERIMENTAL: "true" COSIGN_EXPERIMENTAL: "true"
run: cosign sign ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }} run: cosign sign --yes ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}

View File

@ -1,17 +1,17 @@
# -------------- Build-time variables -------------- # -------------- Build-time variables --------------
ARG NEXTCLOUD_VERSION=28.0.3 ARG NEXTCLOUD_VERSION=28.0.4
ARG PHP_VERSION=8.2 ARG PHP_VERSION=8.2
ARG NGINX_VERSION=1.24 ARG NGINX_VERSION=1.24
ARG ALPINE_VERSION=3.18 ARG ALPINE_VERSION=3.19
ARG HARDENED_MALLOC_VERSION=11 ARG HARDENED_MALLOC_VERSION=11
ARG SNUFFLEUPAGUS_VERSION=0.10.0 ARG SNUFFLEUPAGUS_VERSION=0.10.0
ARG UID=1000 ARG UID=1000
ARG GID=1000 ARG GID=1000
# nextcloud-28.0.3.tar.bz2 # nextcloud-28.0.4.tar.bz2
ARG SHA256_SUM="9ed413c0de16f5b033ceeffcca99c0d61fc698dbeb8db851ac9adf9eef951906" ARG SHA256_SUM="9bfecee1e12fba48c49e9a71caa81c4ba10b2884787fab75d64ccfd122a13019"
# Nextcloud Security <security@nextcloud.com> (D75899B9A724937A) # Nextcloud Security <security@nextcloud.com> (D75899B9A724937A)
ARG GPG_FINGERPRINT="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A" ARG GPG_FINGERPRINT="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"