Skip to content

Commit

Permalink
feat: adds initial discover action
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Jun 2, 2023
1 parent 53e55ab commit 8fd12a3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Expand Up @@ -21,4 +21,7 @@ jobs:
aws_role_arn: ${{ env.AWS_ROLE_ARN }}
aws_region: ${{ env.AWS_REGION }}
earthly_version: 0.7.6
satellite_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
- uses: actions/checkout@v3
- uses: input-output-hk/catalyst-ci/actions/discover@actions
with:
targets: docker
26 changes: 26 additions & 0 deletions actions/discover/action.yml
@@ -0,0 +1,26 @@
name: CI Discovery
description: Discovers Earthfiles in the given paths and compiles data about them
inputs:
paths:
description: A space separated list of paths to search
required: false
default: "."
targets:
description: A space seperated list of targets to filter against
required: false
default: ""

runs:
using: composite
steps:
- name: Discovers
shell: bash
id: discover
run: |
TARGET_FLAGS=""
for target in ${{ inputs.targets }}; do
TARGET_FLAGS+="-t $target "
done
JSON_OUTPUT=$(ci scan -j -i "${TARGET_FLAGS}" ${{ inputs.paths }})
echo "$JSON_OUTPUT"
8 changes: 0 additions & 8 deletions actions/setup/action.yml
Expand Up @@ -15,9 +15,6 @@ inputs:
description: The version of Earthly to install
required: false
default: latest
satellite_address:
description: Address to the remote Earthly satellite
required: true
runs:
using: composite
steps:
Expand All @@ -40,8 +37,3 @@ runs:
- name: Setup Earthly environment
shell: bash
run: mkdir -p /tmp/certs && ci setup /tmp/certs
- uses: actions/checkout@v3
- name: Test
shell: bash
run: |
earthly --buildkit-host "tcp://${{ inputs.satellite_address }}:8372" ./cli+build

0 comments on commit 8fd12a3

Please sign in to comment.