Skip to content

Commit

Permalink
/deps
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind committed Nov 29, 2024
1 parent 9389e83 commit 3ef9903
Show file tree
Hide file tree
Showing 22 changed files with 685 additions and 260 deletions.
28 changes: 19 additions & 9 deletions .github/actions/run-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ inputs:
description: 'The docker-compose file to use'
required: false
default: 'docker-compose.yml'
logs:
description: 'Show logs'
required: false
data_backup_skip:
initialize:
description: 'Skip data backup'
required: false
default: 'true'
default: ''
install_ci_deps:
description: 'Install CI dependencies'
required: false
default: 'true'
mount_olympia:
description: 'The volume to mount the olympia directory to (host, container)'
required: false
docker_target:
description: 'The docker target to run'
required: false
default: 'production'

runs:
using: 'composite'
Expand All @@ -37,25 +41,31 @@ runs:
echo "id=$(id -u)" >> $GITHUB_OUTPUT
- name: Run Docker Container
id: run
continue-on-error: true
shell: bash
env:
DOCKER_VERSION: ${{ inputs.version }}
DOCKER_DIGEST: ${{ inputs.digest }}
COMPOSE_FILE: ${{ inputs.compose_file }}
HOST_UID: ${{ steps.id.outputs.id }}
DATA_BACKUP_SKIP: ${{ inputs.data_backup_skip }}
DATA_BACKUP_SKIP: ${{ inputs.initialize == 'true' && '' || 'true' }}
INSTALL_CI_DEPS: ${{ inputs.install_ci_deps }}
DOCKER_TARGET: ${{ inputs.docker_target }}
MOUNT_OLYMPIA: ${{ inputs.mount_olympia }}
run: |
# Start the specified services
make up
# Exec the run command in the container
# quoted 'EOF' to prevent variable expansion
cat <<'EOF' | docker compose exec --user olympia web sh
cat <<'EOF' | docker compose exec --user olympia web bash
${{ inputs.run }}
EOF
- name: Logs
shell: bash
if: ${{ inputs.logs }}
run: docker compose logs
if: ${{ steps.run.outcome == 'failure' }}
run: |
docker compose logs
exit 1
2 changes: 0 additions & 2 deletions .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
name: Manage Check
services: web nginx
run: make check
data_backup_skip: true
steps:
- uses: actions/checkout@v4
- name: Test (${{ matrix.name }})
Expand All @@ -74,4 +73,3 @@ jobs:
digest: ${{ inputs.digest }}
services: ${{ matrix.services }}
run: ${{ matrix.run }}
data_backup_skip: ${{ matrix.data_backup_skip || 'true' }}
156 changes: 0 additions & 156 deletions .github/workflows/_test_check.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/_test_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ jobs:
services: ''
digest: ${{ inputs.digest }}
version: ${{ inputs.version }}
compose_file: docker-compose.yml
run: |
split="--splits ${{ needs.test_config.outputs.splits }}"
group="--group ${{ matrix.group }}"
Expand Down
Loading

0 comments on commit 3ef9903

Please sign in to comment.