+ ADD CI/CD
This commit is contained in:
70
.github/workflows/cicd.yaml
vendored
Normal file
70
.github/workflows/cicd.yaml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
env:
|
||||
DESCRIPTION: "Wordpress Heroku App Image https://hvgblog.hu"
|
||||
PHP_VERSION: 8.3
|
||||
|
||||
jobs:
|
||||
|
||||
check:
|
||||
name: Check
|
||||
runs-on: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: editorconfig-checker/action-editorconfig-checker@main
|
||||
- name: EditorConfig Check
|
||||
run: editorconfig-checker
|
||||
- name: ShellCheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
- name: PHP security check
|
||||
uses: symfonycorp/security-checker-action@v5
|
||||
|
||||
test:
|
||||
name: Test
|
||||
needs: [check]
|
||||
runs-on: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: php-actions/composer@v6
|
||||
with:
|
||||
dev: yes
|
||||
args: --ignore-platform-reqs
|
||||
php_version: "${{ env.PHP_VERSION }}"
|
||||
- uses: php-actions/composer@v6
|
||||
with:
|
||||
command: outdate
|
||||
args: --strict --direct --ignore-platform-reqs
|
||||
php_version: "${{ env.PHP_VERSION }}"
|
||||
- uses: php-actions/composer@v6
|
||||
with:
|
||||
command: test
|
||||
php_version: "${{ env.PHP_VERSION }}"
|
||||
|
||||
image_build:
|
||||
name: Image Build
|
||||
needs: [check,test]
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: felegy/mirror-action@master
|
||||
with:
|
||||
REMOTE: git@${{ secrets.DEPLOY_REPO }}:${{ github.repository }}.git
|
||||
SSH_CONFIG: |
|
||||
Host ${{ secrets.DEPLOY_REPO }}
|
||||
ProxyCommand cloudflared access ssh --hostname %h
|
||||
GIT_SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
GIT_SSH_NO_VERIFY_HOST: "true"
|
||||
Reference in New Issue
Block a user