-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
53 lines (48 loc) · 1.67 KB
/
action.yml
File metadata and controls
53 lines (48 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: 'Setup Dinghy'
description: 'Setup Dinghy for use in GitHub Actions workflows'
inputs:
prepare-images:
description: 'list of images to prepare in advance'
required: false
default: 'engine'
outputs:
dinghy-version:
description: 'The version of Dinghy CLI that was installed'
value: ${{ steps.install-dinghy-cli.outputs.dinghy-version }}
runs:
using: 'composite'
steps:
- name: Install Dinghy CLI
id: install-dinghy-cli
shell: bash
run: |
echo "::group::Install Dinghy CLI"
if [ -z "$DINGHY_VERSION" ]; then
DINGHY_VERSION="${DINGHY_CLI_VERSION:-latest}"
if [ "$DINGHY_VERSION" = "latest" ]; then
DINGHYRC="${APP_HOME:-.}/.dinghyrc"
if [ -f "$DINGHYRC" ]; then
while IFS= read -r line || [ -n "$line" ]; do
case "$line" in
DINGHY_ENGINE_VERSION=*)
DINGHY_VERSION="${line#DINGHY_ENGINE_VERSION=}"
break
;;
esac
done < "$DINGHYRC"
fi
if [ "$DINGHY_VERSION" != "latest" ]; then
export DINGHY_VERSION="$DINGHY_VERSION"
fi
fi
fi
curl -fsSL "https://get.dinghy.dev/install.sh?source=github-action&version=$DINGHY_VERSION" | sh
export PATH="$HOME/.dinghy/bin:$PATH"
echo "::endgroup::"
echo "::group::Prepare Images"
PREPARE_IMAGES="${{ inputs.prepare-images }}"
dinghy docker cache --include-images $PREPARE_IMAGES
echo "::endgroup::"
echo "::group::Prepare Workflow"
dinghy gh prepare
echo "::endgroup::"