Skip to content

change log permission #304

change log permission

change log permission #304

name: Development Deployment
on:
push:
branches: [ "master" ]
workflow_dispatch:
jobs:
phplint:
name: PHP Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.1
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run PHP Linter
run: composer run-script phplint
- name: Test Info
uses: rjstone/discord-webhook-notify@v1
with:
severity: error
details: Code-Style error.
webhookUrl: ${{ secrets.WEBHOOK_DISCORD_URL }}
if: failure()
phpstan:
name: PHP Stan
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.1
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run PHP Stan
run: composer run-script phpstan
- name: Test Info
uses: rjstone/discord-webhook-notify@v1
with:
severity: error
details: Code-Style error.
webhookUrl: ${{ secrets.WEBHOOK_DISCORD_URL }}
if: failure()
phpcs:
name: PHP CodeSniffer
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.1
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run PHP Codesniffer
run: composer run-script phpcs
- name: Test Info
uses: rjstone/discord-webhook-notify@v1
with:
severity: error
details: Code-Style error.
webhookUrl: ${{ secrets.WEBHOOK_DISCORD_URL }}
if: failure()
phpunit:
name: PHP Unit Test
needs:
- phplint
- phpstan
- phpcs
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.1
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run PHP Unit Test
run: composer run-script unittest
- name: Test Info
uses: rjstone/discord-webhook-notify@v1
with:
severity: error
details: Test error.
webhookUrl: ${{ secrets.WEBHOOK_DISCORD_URL }}
if: failure()
phpfunctional:
name: PHP Functional Test
needs:
- phplint
- phpstan
- phpcs
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.1
- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: pdo, pdo_sqlite
ini-values: date.timezone='UTC'
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run PHP Unit Test
run: composer run-script functionaltest
- name: Test Info
uses: rjstone/discord-webhook-notify@v1
with:
severity: error
details: Test error.
webhookUrl: ${{ secrets.WEBHOOK_DISCORD_URL }}
if: failure()
deployment_of_hackathon_to_build:
name: Deploy Build
needs:
- phpcs
- phplint
- phpstan
- phpunit
- phpfunctional
runs-on: ubuntu-20.04
steps:
- name: Get latest code
uses: actions/checkout@v4.1.1
- name: Install Composer Dependencies
run: composer install --prefer-dist --no-progress --no-dev
- name: Run create openapi Data
run: composer run-script openapi
- name: rsync deployments
uses: burnett01/rsync-deployments@6.0.0
with:
switches: -avz --no-o --no-g --no-perms --no-t -omit-dir-times --delete --exclude-from='.rsync-exclude'
path: /
remote_path: ${{ secrets.DEPLOY_PATH_API_BUILD }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_port: ${{ secrets.DEPLOY_PORT }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
remote_key_pass: ${{ secrets.DEPLOY_KEY_PASS }}
- name: Test Info Success
uses: rjstone/discord-webhook-notify@v1
with:
severity: info
details: Successful deployment on build.
webhookUrl: ${{ secrets.WEBHOOK_DISCORD_URL }}
if: success()
- name: Test Info Failure
uses: rjstone/discord-webhook-notify@v1
with:
severity: error
details: Failure deployment on build.
webhookUrl: ${{ secrets.WEBHOOK_DISCORD_URL }}
if: always()