Upload files to ".gitea/actions/compose-up"
This commit is contained in:
37
.gitea/actions/compose-up/action.yml
Normal file
37
.gitea/actions/compose-up/action.yml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
name: compose-up
|
||||||
|
description: Run docker compose up using an explicit image (DOCKER_IMAGE) on Linux/Windows.
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
image:
|
||||||
|
description: Full image reference (registry/repo:tag or @sha256:...)
|
||||||
|
required: true
|
||||||
|
workdir:
|
||||||
|
description: Directory containing compose files on the runner
|
||||||
|
required: false
|
||||||
|
default: .
|
||||||
|
compose_args:
|
||||||
|
description: Arguments after `docker compose` (default runs up -d with pull)
|
||||||
|
required: false
|
||||||
|
default: up -d --pull always --remove-orphans
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Compose Up (Linux/macOS)
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ inputs.workdir }}
|
||||||
|
env:
|
||||||
|
DOCKER_IMAGE: ${{ inputs.image }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
docker compose ${{ inputs.compose_args }}
|
||||||
|
|
||||||
|
- name: Compose Up (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
|
working-directory: ${{ inputs.workdir }}
|
||||||
|
env:
|
||||||
|
DOCKER_IMAGE: ${{ inputs.image }}
|
||||||
|
run: |
|
||||||
|
docker compose ${{ inputs.compose_args }}
|
||||||
Reference in New Issue
Block a user