From 0dfd83ed700e22923c5ecfcaf4958624028ebdfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Aveiro?= Date: Mon, 24 Mar 2025 12:27:49 +0000 Subject: [PATCH 1/3] feat: add Beacon and Multi-Event capabilities Users can now specify the Beacon and the Event they want to run the scans on, thus enabling CI/CD scanning of internal assets and multiple machine events. BREAKING: New multi-event logic may break existing environments where event disambiguation might be required. --- action.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/action.yaml b/action.yaml index 00d6389..49fc097 100644 --- a/action.yaml +++ b/action.yaml @@ -1,6 +1,6 @@ name: 'Ethiack Job Manager Action' description: 'Integrates Ethiack Job Manager with GitHub Actions for managing Artiacker jobs.' -author: 'Ethiack, Lda.' +author: 'Ethiack, Lda' branding: icon: 'search' @@ -18,6 +18,14 @@ inputs: description: 'The URL of the target service. Required for commands "launch", and "check".' required: false default: '' + beacon_id: + description: 'The beacon ID of the service. Optional for commands "launch" and "check".' + required: false + default: '' + event_slug: + description: 'The event slug of the service. Optional for commands "launch" and "check".' + required: false + default: '' args: description: 'The arguments to pass to the job.' required: false @@ -68,7 +76,14 @@ runs: exit 1 fi fi - + ## Add beacon_id input if provided for launch or check + if ([ "${{ inputs.command }}" = "launch" ] || [ "${{ inputs.command }}" = "check" ]) && [ -n "${{ inputs.beacon_id }}" ]; then + COMMAND="$COMMAND --beacon-id ${{ inputs.beacon_id }}" + fi + ## Add event_slug input if provided for launch or check + if ([ "${{ inputs.command }}" = "launch" ] || [ "${{ inputs.command }}" = "check" ]) && [ -n "${{ inputs.event_slug }}" ]; then + COMMAND="$COMMAND --event-slug ${{ inputs.event_slug }}" + fi ## Add uuid input if needed if [ "${{ inputs.command }}" = "cancel" ] || [ "${{ inputs.command }}" = "info" ] || [ "${{ inputs.command }}" = "status" ] || [ "${{ inputs.command }}" = "success" ] || [ "${{ inputs.command }}" = "await" ]; then if [ -n "${{ inputs.uuid }}" ]; then From 247c068ce16170e588fa3b72444b469c28c85551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Aveiro?= Date: Thu, 3 Apr 2025 17:47:23 +0100 Subject: [PATCH 2/3] fix: update action.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 49fc097..6751e11 100644 --- a/action.yaml +++ b/action.yaml @@ -81,7 +81,7 @@ runs: COMMAND="$COMMAND --beacon-id ${{ inputs.beacon_id }}" fi ## Add event_slug input if provided for launch or check - if ([ "${{ inputs.command }}" = "launch" ] || [ "${{ inputs.command }}" = "check" ]) && [ -n "${{ inputs.event_slug }}" ]; then + if [ "${{ inputs.command }}" = "launch" ] || [ "${{ inputs.command }}" = "check" ] && [ -n "${{ inputs.event_slug }}" ]; then COMMAND="$COMMAND --event-slug ${{ inputs.event_slug }}" fi ## Add uuid input if needed From cbc7cd121eed8667794c52377ff2f36d64d83110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Aveiro?= Date: Thu, 3 Apr 2025 17:52:57 +0100 Subject: [PATCH 3/3] fix: update action.yaml --- action.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/action.yaml b/action.yaml index 6751e11..b1ddb14 100644 --- a/action.yaml +++ b/action.yaml @@ -77,12 +77,16 @@ runs: fi fi ## Add beacon_id input if provided for launch or check - if ([ "${{ inputs.command }}" = "launch" ] || [ "${{ inputs.command }}" = "check" ]) && [ -n "${{ inputs.beacon_id }}" ]; then - COMMAND="$COMMAND --beacon-id ${{ inputs.beacon_id }}" + if [ "${{ inputs.command }}" = "launch" ] || [ "${{ inputs.command }}" = "check" ]; then + if [ -n "${{ inputs.beacon_id }}" ]; then + COMMAND="$COMMAND --beacon-id ${{ inputs.beacon_id }}" + fi fi ## Add event_slug input if provided for launch or check - if [ "${{ inputs.command }}" = "launch" ] || [ "${{ inputs.command }}" = "check" ] && [ -n "${{ inputs.event_slug }}" ]; then - COMMAND="$COMMAND --event-slug ${{ inputs.event_slug }}" + if [ "${{ inputs.command }}" = "launch" ] || [ "${{ inputs.command }}" = "check" ]; then + if [ -n "${{ inputs.event_slug }}" ]; then + COMMAND="$COMMAND --event-slug ${{ inputs.event_slug }}" + fi fi ## Add uuid input if needed if [ "${{ inputs.command }}" = "cancel" ] || [ "${{ inputs.command }}" = "info" ] || [ "${{ inputs.command }}" = "status" ] || [ "${{ inputs.command }}" = "success" ] || [ "${{ inputs.command }}" = "await" ]; then