You've already forked Php-Template
Does not work.
Some checks failed
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Failing after 55s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 1m25s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 1m31s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 2m45s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 2m59s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 3m21s
Some checks failed
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Failing after 55s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 1m25s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 1m31s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 2m45s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 2m59s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 3m21s
This commit is contained in:
@@ -11,6 +11,11 @@ jobs:
|
|||||||
name: 🧪 ✨ Database Migrations
|
name: 🧪 ✨ Database Migrations
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Dump GitHub context
|
||||||
|
env:
|
||||||
|
GITHUB_CONTEXT: ${{ toJson(gitea) }}
|
||||||
|
run: echo "$GITHUB_CONTEXT"
|
||||||
|
|
||||||
- name: 🛡️ 🔒 Add Siteworx CA Certificates
|
- name: 🛡️ 🔒 Add Siteworx CA Certificates
|
||||||
run: |
|
run: |
|
||||||
apt update && apt install -yq ca-certificates curl
|
apt update && apt install -yq ca-certificates curl
|
||||||
@@ -33,41 +38,32 @@ jobs:
|
|||||||
echo "Starting Support Containers"
|
echo "Starting Support Containers"
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
--network "${{ env.JOB_CONTAINER_NAME }}-DatabaseMigrations-network" \
|
--network "${{ env.JOB_CONTAINER_NAME }}-DatabaseMigrations-network" \
|
||||||
--name postgres \
|
--name ${{ env.JOB_ID }}-postgres \
|
||||||
-e POSTGRES_USER=postgres \
|
-e POSTGRES_USER=postgres \
|
||||||
-e POSTGRES_PASSWORD=postgres \
|
-e POSTGRES_PASSWORD=postgres \
|
||||||
-e POSTGRES_DB=postgres \
|
-e POSTGRES_DB=postgres \
|
||||||
-p 5432 \
|
-p 5432 \
|
||||||
-d postgres:17
|
-d postgres:17
|
||||||
|
|
||||||
- name: Sleep
|
- name: Run Migrations
|
||||||
run: |
|
run: |
|
||||||
docker run --rm \
|
docker run \
|
||||||
--network "${{ env.JOB_CONTAINER_NAME }}-DatabaseMigrations-network" \
|
--name ${{ env.JOB_ID }}-migrate \
|
||||||
--name ${{ env.JOB_CONTAINER_NAME }}-sleep \
|
--rm \
|
||||||
--volumes-from ${{ env.JOB_CONTAINER_NAME }} \
|
--volumes-from ${{ env.JOB_CONTAINER_NAME }} \
|
||||||
|
--network "${{ env.JOB_CONTAINER_NAME }}-DatabaseMigrations-network" \
|
||||||
-w ${{ github.workspace }} \
|
-w ${{ github.workspace }} \
|
||||||
alpine:3.18 sh -c "sleep 500"
|
siteworxpro/migrate:v4.18.3 -database "postgres://postgres:postgres@${{ env.JOB_ID }}-postgres:5432/postgres?sslmode=disable" -path db/migrations up
|
||||||
|
|
||||||
# - name: Run Migrations
|
- name: Rollback Migrations
|
||||||
# run: |
|
run: |
|
||||||
# docker run \
|
docker run \
|
||||||
# --name ${{ env.JOB_CONTAINER_NAME }}-migrate \
|
--name ${{ env.JOB_ID }}-migrate \
|
||||||
# --rm \
|
--rm \
|
||||||
# --volumes-from ${{ env.JOB_CONTAINER_NAME }} \
|
--volumes-from ${{ env.JOB_CONTAINER_NAME }} \
|
||||||
# --network "${{ env.JOB_CONTAINER_NAME }}-DatabaseMigrations-network" \
|
--network "${{ env.JOB_CONTAINER_NAME }}-DatabaseMigrations-network" \
|
||||||
# -w ${{ github.workspace }} \
|
-w ${{ github.workspace }} \
|
||||||
# siteworxpro/migrate:v4.18.3 -database "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" -path db/migrations up
|
siteworxpro/migrate:v4.18.3 -database "postgres://postgres:postgres@${{ env.JOB_ID }}-postgres:5432/postgres?sslmode=disable" -path db/migrations down --all
|
||||||
|
|
||||||
# - name: Rollback Migrations
|
|
||||||
# run: |
|
|
||||||
# docker run \
|
|
||||||
# --name ${{ env.JOB_CONTAINER_NAME }}-migrate \
|
|
||||||
# --rm \
|
|
||||||
# --volumes-from ${{ env.JOB_CONTAINER_NAME }} \
|
|
||||||
# --network "${{ env.JOB_CONTAINER_NAME }}-DatabaseMigrations-network" \
|
|
||||||
# -w ${{ github.workspace }} \
|
|
||||||
# siteworxpro/migrate:v4.18.3 -database "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" -path db/migrations down --all
|
|
||||||
|
|
||||||
- name: Tear Down Support Containers
|
- name: Tear Down Support Containers
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user