Skip to content

Commit

Permalink
chore(gh-action): update docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
leiicamundi committed Apr 11, 2024
1 parent a34f0e4 commit 38c6b9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 12 additions & 4 deletions .github/actions/compose/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,40 @@ description: |
Compose Wrapper
inputs:
compose_file:
description: "Full path to the compose file"
required: true
description: "Name of the compose file"
required: false
default: "docker-compose.yml"
project_name:
description: "Project name to allow running the same file multiple times"
required: true
healthy_timeout:
description: "How long to wait until we consider the compose to be unhealthy"
required: false
default: "300"
cwd:
description: "Current working directory"
required: false
default: "${{ github.workspace }}"
runs:
using: composite
steps:
- name: Run ${{ inputs.project_name }} compose
uses: hoverkraft-tech/compose-action@178aeba5c9dbeed89ffffbb3e6548ec08e9839cf # v1.5.1
uses: hoverkraft-tech/compose-action@802a148945af6399a338c7906c267331b39a71af # v2.0.0
with:
compose-file: |
${{ inputs.compose_file }}
compose-flags: "--project-name ${{ inputs.project_name }}"
cwd: ${{ inputs.cwd }}

- name: Short sleep to let it startup
shell: bash
run: sleep 3

- name: Check if service is healthy
shell: bash
run: |
${{ github.action_path }}/healthy.sh
env:
FILE: ${{ inputs.compose_file }}
FILE: "${{ inputs.cwd }}/${{ inputs.compose_file }}"
TIMEOUT: ${{ inputs.healthy_timeout }}
COMPOSE_FLAGS: "--project-name ${{ inputs.project_name }}"
1 change: 0 additions & 1 deletion .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ jobs:
- name: Start Test Environment
uses: ./.github/actions/compose
with:
compose_file: ${{ github.workspace }}/docker-compose.yml
project_name: keycloak
env:

Expand Down

0 comments on commit 38c6b9e

Please sign in to comment.