Compare commits
13 Commits
feature/de
...
qore
Author | SHA1 | Date | |
---|---|---|---|
87d11faa46 | |||
7a9c883a9b | |||
8d9005b7b7 | |||
a5f57a6b44 | |||
176e909c65 | |||
842dc88112 | |||
85dc35da7b | |||
aad3c29a9a | |||
8f0b8b5a27 | |||
8e130e6b73 | |||
3db2bc4f36 | |||
2788f3cd4e | |||
7ffdb3fff4 |
@@ -5,7 +5,7 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
env:
|
env:
|
||||||
required: false
|
required: true
|
||||||
type: string
|
type: string
|
||||||
inputs:
|
inputs:
|
||||||
environment:
|
environment:
|
||||||
@@ -18,9 +18,6 @@ on:
|
|||||||
node-package-manager:
|
node-package-manager:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
node-package-manager-install-args:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
frontend-directory:
|
frontend-directory:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@@ -28,10 +25,6 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs
|
default: --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs
|
||||||
working-directory:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: ./
|
|
||||||
username:
|
username:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@@ -50,19 +43,16 @@ jobs:
|
|||||||
username: ${{ inputs.username }}
|
username: ${{ inputs.username }}
|
||||||
password: ${{ inputs.password }}
|
password: ${{ inputs.password }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup composer
|
- name: Setup composer
|
||||||
uses: https://git.qlic.nl/actions/setup-composer@39079e200da5483e53afeff1be193daec6ed561a
|
uses: https://git.qlic.nl/actions/setup-composer@v1
|
||||||
with:
|
with:
|
||||||
args: ${{ inputs.composer-args }}
|
args: ${{ inputs.composer-args }}
|
||||||
working-directory: ${{ inputs.working-directory }}
|
|
||||||
|
|
||||||
- name: Set working directory
|
|
||||||
run: cd ${{ inputs.working-directory }}
|
|
||||||
|
|
||||||
- name: Create .env file from secret
|
- name: Create .env file from secret
|
||||||
if: ${{ secrets.env }}
|
|
||||||
run: echo "${{ secrets.env }}" > .env
|
run: echo "${{ secrets.env }}" > .env
|
||||||
working-directory: ${{ inputs.working-directory }}
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: ${{ inputs.node-package-manager }}
|
if: ${{ inputs.node-package-manager }}
|
||||||
@@ -72,29 +62,25 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${{ inputs.node-package-manager }}" = "npm" ]; then
|
if [ "${{ inputs.node-package-manager }}" = "npm" ]; then
|
||||||
${{ inputs.node-package-manager }} ci ${{ inputs.node-package-manager-install-args }}
|
${{ inputs.node-package-manager }} ci
|
||||||
elif [ "${{ inputs.node-package-manager }}" = "pnpm" ] || [ "${{ inputs.node-package-manager }}" = "yarn" ]; then
|
elif [ "${{ inputs.node-package-manager }}" = "pnpm" ] || [ "${{ inputs.node-package-manager }}" = "yarn" ]; then
|
||||||
${{ inputs.node-package-manager }} install --frozen-lockfile ${{ inputs.node-package-manager-install-args }}
|
${{ inputs.node-package-manager }} install --frozen-lockfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${{ inputs.node-package-manager }}" != "none" ] && [ -n "${{ inputs.node-package-manager }}" ]; then
|
if [ "${{ inputs.node-package-manager }}" != "none" ] && [ -n "${{ inputs.node-package-manager }}" ]; then
|
||||||
${{ inputs.node-package-manager }} run build
|
${{ inputs.node-package-manager }} run build
|
||||||
fi
|
fi
|
||||||
working-directory: ${{ inputs.working-directory }}
|
|
||||||
|
|
||||||
|
|
||||||
- name: Set up SSH agent
|
- name: Set up SSH agent
|
||||||
uses: webfactory/ssh-agent@v0.5.3
|
uses: webfactory/ssh-agent@v0.5.3
|
||||||
with:
|
with:
|
||||||
ssh-private-key: ${{ secrets.ssh-private-key }}
|
ssh-private-key: ${{ secrets.ssh-private-key }}
|
||||||
working-directory: ${{ inputs.working-directory }}
|
|
||||||
|
|
||||||
- name: Disable strict host key checking
|
- name: Disable strict host key checking
|
||||||
run: |
|
run: |
|
||||||
echo "Host *" >> ~/.ssh/config
|
echo "Host *" >> ~/.ssh/config
|
||||||
echo " StrictHostKeyChecking no" >> ~/.ssh/config
|
echo " StrictHostKeyChecking no" >> ~/.ssh/config
|
||||||
working-directory: ${{ inputs.working-directory }}
|
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: vendor/bin/dep deploy ${{ inputs.environment }}
|
run: vendor/bin/dep deploy environment="${{ inputs.environment }}"
|
||||||
working-directory: ${{ inputs.working-directory }}
|
|
||||||
|
93
.gitea/workflows/qore.yml
Normal file
93
.gitea/workflows/qore.yml
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
ssh-private-key:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
env:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
frontend-env:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
inputs:
|
||||||
|
environment:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
image:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: git.qlic.nl/qlic/deploy:php8.3-node22
|
||||||
|
node-package-manager:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
frontend-directory:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
composer-args:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs
|
||||||
|
username:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ${{ vars.REGISTRY_USERNAME }}
|
||||||
|
password:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ${{ vars.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
container:
|
||||||
|
image: ${{ inputs.image }}
|
||||||
|
credentials:
|
||||||
|
username: ${{ inputs.username }}
|
||||||
|
password: ${{ inputs.password }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
clean: false
|
||||||
|
|
||||||
|
- name: Setup composer
|
||||||
|
uses: https://git.qlic.nl/actions/setup-composer@v1
|
||||||
|
with:
|
||||||
|
args: ${{ inputs.composer-args }}
|
||||||
|
|
||||||
|
- name: Create frontend .env file from secret
|
||||||
|
run: echo "${{ secrets.frontend-env }}" > frontend/.env
|
||||||
|
|
||||||
|
- name: Create .env file from secret
|
||||||
|
run: echo "${{ secrets.env }}" > .env
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
if: ${{ inputs.node-package-manager }}
|
||||||
|
run: |
|
||||||
|
if [ -n "${{ inputs.frontend-directory }}" ]; then
|
||||||
|
cd "${{ inputs.frontend-directory }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${{ inputs.node-package-manager }}" = "npm" ]; then
|
||||||
|
${{ inputs.node-package-manager }} ci
|
||||||
|
elif [ "${{ inputs.node-package-manager }}" = "pnpm" ] || [ "${{ inputs.node-package-manager }}" = "yarn" ]; then
|
||||||
|
${{ inputs.node-package-manager }} install --frozen-lockfile
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${{ inputs.node-package-manager }}" != "none" ] && [ -n "${{ inputs.node-package-manager }}" ]; then
|
||||||
|
${{ inputs.node-package-manager }} run build
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Set up SSH agent
|
||||||
|
uses: webfactory/ssh-agent@v0.5.3
|
||||||
|
with:
|
||||||
|
ssh-private-key: ${{ secrets.ssh-private-key }}
|
||||||
|
|
||||||
|
- name: Disable strict host key checking
|
||||||
|
run: |
|
||||||
|
echo "Host *" >> ~/.ssh/config
|
||||||
|
echo " StrictHostKeyChecking no" >> ~/.ssh/config
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: vendor/bin/dep deploy environment="${{ inputs.environment }}"
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
.idea
|
|
Reference in New Issue
Block a user