-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🩹 fix: Use container id not service name in compose actions.
- Loading branch information
1 parent
c8311b5
commit 43d3d45
Showing
4 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: compose-container | ||
description: > | ||
Grabs the container of a given docker compose service. | ||
inputs: | ||
|
||
service: | ||
required: true | ||
|
||
outputs: | ||
|
||
id: | ||
description: > | ||
The input service's container id. | ||
value: ${{ steps.fetch.outputs.id }} | ||
|
||
runs: | ||
|
||
using: composite | ||
|
||
steps: | ||
|
||
- name: Retrieve service container id | ||
|
||
id: fetch | ||
|
||
env: | ||
SERVICE: ${{ inputs.service }} | ||
|
||
shell: bash | ||
|
||
run: | | ||
CONTAINER_ID="$(docker compose ps -q "${SERVICE}")" | ||
echo "id=${CONTAINER_ID}" >> "$GITHUB_OUTPUT" | ||
test -n "${CONTAINER_ID}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters