1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-02 17:29:20 +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
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 3
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
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
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 3
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
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
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

View file

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

View file

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

View file

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

View file

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