Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use global workflow for lint #172

Merged
merged 7 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
self-hosted-runner:
# Labels of self-hosted runner in array of string
labels:
- aws-arm-core-2-default
- aws-core-2-default
- gcp-core-2-default
# Labels of self-hosted runner in array of string
labels:
- aws-arm-core-2-default
- aws-core-2-default
- gcp-core-2-default
50 changes: 50 additions & 0 deletions .github/actions/compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Compose

## Description

Compose Wrapper


## Inputs

| name | description | required | default |
| --- | --- | --- | --- |
| `compose_file` | <p>Name of the compose file</p> | `false` | `docker-compose.yml` |
| `project_name` | <p>Project name to allow running the same file multiple times</p> | `true` | `""` |
| `healthy_timeout` | <p>How long to wait until we consider the compose to be unhealthy</p> | `false` | `300` |
| `cwd` | <p>Current working directory</p> | `false` | `${{ github.workspace }}` |


## Runs

This action is a `composite` action.

## Usage

```yaml
- uses: camunda/keycloak/.github/actions/compose@main
with:
compose_file:
# Name of the compose file
#
# Required: false
# Default: docker-compose.yml

project_name:
# Project name to allow running the same file multiple times
#
# Required: true
# Default: ""

healthy_timeout:
# How long to wait until we consider the compose to be unhealthy
#
# Required: false
# Default: 300

cwd:
# Current working directory
#
# Required: false
# Default: ${{ github.workspace }}
```
73 changes: 37 additions & 36 deletions .github/actions/compose/action.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
---
name: Compose
description: |
Compose Wrapper
Compose Wrapper
inputs:
compose_file:
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 }}"
compose_file:
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@e5813a5909aca4ae36058edae58f6e52b9c971f8 # v2.0.1
with:
compose-file: |
${{ inputs.compose_file }}
compose-flags: "--project-name ${{ inputs.project_name }}"
cwd: ${{ inputs.cwd }}
using: composite
steps:
- name: Run ${{ inputs.project_name }} compose
uses: hoverkraft-tech/compose-action@e5813a5909aca4ae36058edae58f6e52b9c971f8 # v2.0.1
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: 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.cwd }}/${{ inputs.compose_file }}"
TIMEOUT: ${{ inputs.healthy_timeout }}
COMPOSE_FLAGS: "--project-name ${{ inputs.project_name }}"
- name: Check if service is healthy
shell: bash
run: |
${{ github.action_path }}/healthy.sh
env:
FILE: ${{ inputs.cwd }}/${{ inputs.compose_file }}
TIMEOUT: ${{ inputs.healthy_timeout }}
COMPOSE_FLAGS: --project-name ${{ inputs.project_name }}
Loading