Compare commits

...

3 Commits

Author SHA1 Message Date
waja
6bd466c247
Merge 35725bd4eb89af3016cace57e7b3a8cbdc57e1bc into bf3c76a5f8040a1fc5951511e0269ad4c23ac52e 2024-01-14 20:28:45 +02:00
bf3c76a5f8 chore: update nginx configuration
- update static file extensions
 - add mjs to mimetype
   https://github.com/hoellen/docker-nextcloud/issues/60
 - remove legacy header
   https://github.com/hoellen/docker-nextcloud/pull/61
2024-01-02 11:10:11 +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
3 changed files with 16 additions and 4 deletions

View File

@ -3,7 +3,9 @@ name: build
on:
workflow_dispatch:
push:
branches: [ master ]
branches:
- master
- version-*
schedule:
# Build the image regularly (each Friday)
- cron: '23 04 * * 5'
@ -27,6 +29,12 @@ jobs:
- name: Extract version for tags
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 "MAJOR_VERSION=$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c2)" >> $GITHUB_ENV
@ -53,7 +61,7 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
latest
${{ env.BRANCH_VERSION }}
${{ env.FULL_VERSION }}
${{ env.MAJOR_VERSION }}

View File

@ -18,7 +18,6 @@ server {
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
@ -67,7 +66,7 @@ server {
index index.php;
}
location ~ \.(?:css|js|svg|gif|map)$ {
location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
try_files $uri /index.php$uri$is_args$args;
expires 6M;
access_log off;

View File

@ -9,6 +9,11 @@ events {
http {
include /etc/nginx/mime.types;
# Add .mjs as a file extension for javascript
# https://github.com/nextcloud/server/pull/36057
types {
application/javascript mjs;
}
default_type application/octet-stream;
access_log /nginx/logs/access.log combined;