mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
try a pre job to set params
This commit is contained in:
parent
5de4a0cfaf
commit
ce4a01255a
41
.github/workflows/pr_checks.yaml
vendored
41
.github/workflows/pr_checks.yaml
vendored
@ -27,17 +27,31 @@ env:
|
|||||||
|
|
||||||
# for full databases
|
# for full databases
|
||||||
INVENTREE_DB_USER: inventree
|
INVENTREE_DB_USER: inventree
|
||||||
POSTGRES_USER: inventree
|
|
||||||
INVENTREE_DB_PASSWORD: password
|
INVENTREE_DB_PASSWORD: password
|
||||||
POSTGRES_PASSWORD: password
|
|
||||||
INVENTREE_DB_HOST: '127.0.0.1'
|
INVENTREE_DB_HOST: '127.0.0.1'
|
||||||
INVENTREE_DEBUG: info
|
INVENTREE_DEBUG: info
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
init:
|
||||||
|
name: set parameters
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
user: ${{ steps.step1.outputs.user }}
|
||||||
|
password: ${{ steps.step1.outputs.password }}
|
||||||
|
host: ${{ steps.step1.outputs.host }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- id: step1
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=user::${{ env.INVENTREE_DB_USER }}"
|
||||||
|
echo "::set-output name=password::${{ env.INVENTREE_DB_PASSWORD }}"
|
||||||
|
echo "::set-output name=host::${{ env.INVENTREE_DB_HOST }}"
|
||||||
|
|
||||||
check_version:
|
check_version:
|
||||||
name: version number
|
name: version number
|
||||||
|
needs: init
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -218,19 +232,17 @@ jobs:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
INVENTREE_DB_ENGINE: django.db.backends.postgresql
|
INVENTREE_DB_ENGINE: django.db.backends.postgresql
|
||||||
INVENTREE_DB_USER: ${{ env.INVENTREE_DB_USER }}
|
INVENTREE_DB_USER: ${{needs.job1.outputs.user }}
|
||||||
INVENTREE_DB_PASSWORD: ${{ env.INVENTREE_DB_PASSWORD }}
|
INVENTREE_DB_HOST: ${{needs.job1.outputs.host }}
|
||||||
INVENTREE_DB_HOST: ${{ env.INVENTREE_DB_HOST }}
|
|
||||||
INVENTREE_DB_PORT: 5432
|
INVENTREE_DB_PORT: 5432
|
||||||
INVENTREE_DEBUG: ${{ env.INVENTREE_DEBUG }}
|
|
||||||
INVENTREE_CACHE_HOST: localhost
|
INVENTREE_CACHE_HOST: localhost
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres
|
image: postgres
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: ${{ env.INVENTREE_DB_USER }}
|
POSTGRES_USER: ${{needs.job1.outputs.user }}
|
||||||
POSTGRES_PASSWORD: ${{ env.INVENTREE_DB_PASSWORD }}
|
POSTGRES_PASSWORD: ${{needs.job1.outputs.password }}
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
|
||||||
@ -272,11 +284,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
# Database backend configuration
|
# Database backend configuration
|
||||||
INVENTREE_DB_ENGINE: django.db.backends.mysql
|
INVENTREE_DB_ENGINE: django.db.backends.mysql
|
||||||
INVENTREE_DB_USER: ${{ env.INVENTREE_DB_USER }}
|
INVENTREE_DB_USER: ${{needs.job1.outputs.user }}
|
||||||
INVENTREE_DB_PASSWORD: ${{ env.INVENTREE_DB_PASSWORD }}
|
INVENTREE_DB_PASSWORD: ${{needs.job1.outputs.password }}
|
||||||
INVENTREE_DB_HOST: ${{ env.INVENTREE_DB_HOST }}
|
INVENTREE_DB_HOST: ${{needs.job1.outputs.host }}
|
||||||
INVENTREE_DB_PORT: 3306
|
INVENTREE_DB_PORT: 3306
|
||||||
INVENTREE_DEBUG: ${{ env.INVENTREE_DEBUG }}
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
@ -284,9 +295,9 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||||
MYSQL_DATABASE: ${{ env.INVENTREE_DB_NAME }}
|
MYSQL_DATABASE: ${{ env.INVENTREE_DB_NAME }}
|
||||||
MYSQL_USER: ${{ env.INVENTREE_DB_USER }}
|
MYSQL_USER: ${{needs.job1.outputs.user }}
|
||||||
MYSQL_PASSWORD: ${{ env.INVENTREE_DB_PASSWORD }}
|
MYSQL_PASSWORD: ${{needs.job1.outputs.password }}
|
||||||
MYSQL_ROOT_PASSWORD: ${{ env.INVENTREE_DB_PASSWORD }}
|
MYSQL_ROOT_PASSWORD: ${{needs.job1.outputs.password }}
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
|
Loading…
Reference in New Issue
Block a user