1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

Fix line endings and add a .gitattributes file.

The .gitattributes file can be used to enforce and manage the types of line
endings desired for specific types of files at the repository, as well as
to manage GitHub's automatic detection of documentation and the types of
programming languages used at the repository.

I've commented links to the relevant documentation within the attached
.gitattributes file to assist with guiding future additions to the file.
This commit is contained in:
Caleb Mazalevskis 2022-07-04 23:48:34 +08:00
parent 4fbf687c2f
commit 18f48303d9
No known key found for this signature in database
GPG key ID: 082E6BC1046FAB95
6 changed files with 185 additions and 167 deletions

18
.gitattributes vendored Normal file
View file

@ -0,0 +1,18 @@
# AVideo .gitattributes file.
# Refer to:
# https://help.github.com/articles/dealing-with-line-endings/
*.yaml eol=lf
*.yml eol=lf
# Refer to:
# https://github.com/github/linguist
*.md linguist-documentation
*.txt linguist-documentation
.github/* -linguist-detectable
.vscode/* -linguist-detectable
node_modules/* -linguist-detectable
vendor/* -linguist-detectable

34
.github/stale.yml vendored
View file

@ -1,17 +1,17 @@
# Number of days of inactivity before an issue becomes stale # Number of days of inactivity before an issue becomes stale
daysUntilStale: 30 daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed # Number of days of inactivity before a stale issue is closed
daysUntilClose: 3 daysUntilClose: 3
# Issues with these labels will never be considered stale # Issues with these labels will never be considered stale
exemptLabels: exemptLabels:
- pinned - pinned
- security - security
# Label to use when marking an issue as stale # Label to use when marking an issue as stale
staleLabel: wontfix staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable # Comment to post when marking an issue as stale. Set to `false` to disable
markComment: > markComment: >
This issue has been automatically marked as stale because it has not had This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you recent activity. It will be closed if no further activity occurs. Thank you
for your contributions. for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable # Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false closeComment: false

View file

@ -1,38 +1,38 @@
name: Docker Image CI name: Docker Image CI
on: on:
push: push:
branches: branches:
- "master" - "master"
pull_request: pull_request:
branches: branches:
- "master" - "master"
# schedule: # schedule:
# - cron: '35 2 * * 1' # - cron: '35 2 * * 1'
permissions: permissions:
contents: read contents: read
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push - name: Build and push
id: docker_build id: docker_build
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
push: true push: true
tags: ${{ secrets.DOCKERHUB_IMAGE }} tags: ${{ secrets.DOCKERHUB_IMAGE }}

View file

@ -1,54 +1,54 @@
name: Validate/Lint name: Validate/Lint
on: [push, pull_request] on: [push, pull_request]
permissions: permissions:
contents: read contents: read
jobs: jobs:
build: build:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
matrix: matrix:
operating-system: [ubuntu-latest] operating-system: [ubuntu-latest]
php-versions: ['7.3', '7.4', '8.0', '8.1'] php-versions: ['7.3', '7.4', '8.0', '8.1']
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up PHP - name: Set up PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extensions: pcre extensions: pcre
- name: Validate composer.json and composer.lock - name: Validate composer.json and composer.lock
run: composer validate run: composer validate
- name: Lint - name: Lint
run: | run: |
lintPaths=() lintPaths=()
lintPaths+=("${GITHUB_WORKSPACE}/admin") lintPaths+=("${GITHUB_WORKSPACE}/admin")
lintPaths+=("${GITHUB_WORKSPACE}/feed") lintPaths+=("${GITHUB_WORKSPACE}/feed")
lintPaths+=("${GITHUB_WORKSPACE}/install") lintPaths+=("${GITHUB_WORKSPACE}/install")
lintPaths+=("${GITHUB_WORKSPACE}/locale") lintPaths+=("${GITHUB_WORKSPACE}/locale")
lintPaths+=("${GITHUB_WORKSPACE}/objects") lintPaths+=("${GITHUB_WORKSPACE}/objects")
lintPaths+=("${GITHUB_WORKSPACE}/view") lintPaths+=("${GITHUB_WORKSPACE}/view")
lintPaths+=("${GITHUB_WORKSPACE}/index.php") lintPaths+=("${GITHUB_WORKSPACE}/index.php")
for lintPath in "${lintPaths[@]}" for lintPath in "${lintPaths[@]}"
do do
for file in `find "$lintPath"` for file in `find "$lintPath"`
do do
EXTENSION="${file##*.}" EXTENSION="${file##*.}"
if [ "$EXTENSION" == "php" ] || [ "$EXTENSION" == "phtml" ] if [ "$EXTENSION" == "php" ] || [ "$EXTENSION" == "phtml" ]
then then
RESULTS=`php -l "$file"` RESULTS=`php -l "$file"`
if [ "$RESULTS" != "No syntax errors detected in $file" ] if [ "$RESULTS" != "No syntax errors detected in $file" ]
then then
echo $RESULTS echo $RESULTS
fi fi
fi fi
done done
done done

View file

@ -1 +1 @@
theme: jekyll-theme-cayman theme: jekyll-theme-cayman

View file

@ -1,65 +1,65 @@
version: '3' version: '3'
services: services:
web: web:
build: . build: .
restart: "unless-stopped" restart: "unless-stopped"
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
environment: environment:
DB_MYSQL_HOST: "database" DB_MYSQL_HOST: "database"
DB_MYSQL_PORT: 3306 DB_MYSQL_PORT: 3306
DB_MYSQL_NAME: "avideo" DB_MYSQL_NAME: "avideo"
DB_MYSQL_USER: "avideo" DB_MYSQL_USER: "avideo"
DB_MYSQL_PASSWORD: "avideo" DB_MYSQL_PASSWORD: "avideo"
SERVER_NAME: "localhost" SERVER_NAME: "localhost"
ENABLE_PHPMYADMIN: "yes" ENABLE_PHPMYADMIN: "yes"
CREATE_TLS_CERTIFICATE: "yes" CREATE_TLS_CERTIFICATE: "yes"
TLS_CERTIFICATE_FILE: "/etc/apache2/ssl/localhost.crt" TLS_CERTIFICATE_FILE: "/etc/apache2/ssl/localhost.crt"
TLS_CERTIFICATE_KEY: "/etc/apache2/ssl/localhost.key" TLS_CERTIFICATE_KEY: "/etc/apache2/ssl/localhost.key"
CONTACT_EMAIL: "admin@localhost" CONTACT_EMAIL: "admin@localhost"
SYSTEM_ADMIN_PASSWORD: "password" SYSTEM_ADMIN_PASSWORD: "password"
WEBSITE_TITLE: "AVideo" WEBSITE_TITLE: "AVideo"
MAIN_LANGUAGE: "en_US" MAIN_LANGUAGE: "en_US"
volumes: volumes:
- "./var/www/avideo:/var/www/avideo" - "./var/www/avideo:/var/www/avideo"
depends_on: depends_on:
- database - database
- phpmyadmin - phpmyadmin
networks: networks:
- app_net - app_net
phpmyadmin: phpmyadmin:
image: "phpmyadmin/phpmyadmin" image: "phpmyadmin/phpmyadmin"
restart: "unless-stopped" restart: "unless-stopped"
environment: environment:
PMA_ABSOLUTE_URI: "https://localhost/phpmyadmin" PMA_ABSOLUTE_URI: "https://localhost/phpmyadmin"
PMA_HOST: "database" PMA_HOST: "database"
PMA_PORT: 3306 PMA_PORT: 3306
PMA_CONTROLUSER: "avideo" PMA_CONTROLUSER: "avideo"
PMA_CONTROLPASS: "avideo" PMA_CONTROLPASS: "avideo"
PMA_PMADB: "avideo" PMA_PMADB: "avideo"
HIDE_PHP_VERSION: "true" HIDE_PHP_VERSION: "true"
depends_on: depends_on:
- database - database
networks: networks:
- app_net - app_net
database: database:
image: "mariadb:latest" image: "mariadb:latest"
restart: "unless-stopped" restart: "unless-stopped"
environment: environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes" MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_INITDB_SKIP_TZINFO: 1 MYSQL_INITDB_SKIP_TZINFO: 1
MYSQL_DATABASE: "avideo" MYSQL_DATABASE: "avideo"
MYSQL_USER: "avideo" MYSQL_USER: "avideo"
MYSQL_PASSWORD: "avideo" MYSQL_PASSWORD: "avideo"
volumes: volumes:
- ./.compose/db:/var/lib/mysql - ./.compose/db:/var/lib/mysql
networks: networks:
- app_net - app_net
networks: networks:
app_net: app_net:
driver: bridge driver: bridge