Skip to content

Commit b3ad5bc

Browse files
committed
fixup
1 parent 8f70f75 commit b3ad5bc

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

ephemeral/shutdown/action.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,13 @@ runs:
3333
echo "previewName=$previewName" >> $GITHUB_ENV
3434
3535
- name: Shutdown ephemeral instance
36-
# Source shared retry function
37-
# GH_ACTION_ROOT is set in the main action.yml and points to the root of the action
38-
# This ensures the script is found regardless of where the action is run from.
39-
env:
40-
SHARED_SCRIPTS_PATH: ${{ env.GH_ACTION_ROOT }}/.github/actions/shared-scripts
4136
shell: bash
4237
run: |
4338
AUTH_HEADER="ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-auth-token }}}}"
4439
CONTENT_TYPE_HEADER="content-type: application/json"
4540
API_URL_BASE="https://api.localstack.cloud/v1/compute/instances"
4641
47-
source "$SHARED_SCRIPTS_PATH/retry-function.sh"
42+
source ${{ github.action_path }}/retry-function.sh
4843
shutdown_instance() {
4944
# The API returns a 200 on successful deletion.
5045
# We use --fail-with-body so curl fails on server errors (5xx) and triggers the retry.

ephemeral/startup/action.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ inputs:
2929
runs:
3030
using: composite
3131
steps:
32-
- run: >
33-
echo "GH_ACTION_ROOT=$(
34-
ls -d $(
35-
ls -d ./../../_actions/* |
36-
grep -i localstack |
37-
tail -n1
38-
)/setup-localstack/* |
39-
grep -v completed |
40-
tail -n1
41-
)" >> $GITHUB_ENV
42-
shell: bash
43-
4432
- name: Initial PR comment
4533
if: inputs.github-token
4634
uses: jenseng/dynamic-uses@5175289a9a87978dcfcb9cf512b821d23b2a53eb # v1
@@ -68,19 +56,14 @@ runs:
6856
echo "name=$previewName" >> $GITHUB_OUTPUT
6957
7058
- name: Create preview environment
71-
# Source shared retry function
72-
# GH_ACTION_ROOT is set in the main action.yml and points to the root of the action
73-
# This ensures the script is found regardless of where the action is run from.
74-
env:
75-
SHARED_SCRIPTS_PATH: ${{ env.GH_ACTION_ROOT }}/.github/actions/shared-scripts
7659
shell: bash
7760
id: create-instance
7861
run: |
7962
AUTH_HEADER="ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-auth-token }}}}"
8063
CONTENT_TYPE_HEADER="content-type: application/json"
8164
API_URL_BASE="https://api.localstack.cloud/v1/compute/instances"
8265
83-
source "$SHARED_SCRIPTS_PATH/retry-function.sh"
66+
source ${{ github.action_path }}/retry-function.sh
8467
fetch_instances() {
8568
local list_response
8669
list_response=$(curl --fail-with-body -s -X GET \
@@ -159,15 +142,12 @@ runs:
159142
shell: bash
160143
env:
161144
previewName: ${{ steps.preview-name.outputs.name }}
162-
# Source shared retry function
163-
# GH_ACTION_ROOT is set in the main action.yml and points to the root of the action
164-
SHARED_SCRIPTS_PATH: ${{ env.GH_ACTION_ROOT }}/.github/actions/shared-scripts
165145
run: |
166146
AUTH_HEADER="ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-auth-token }}}}"
167147
CONTENT_TYPE_HEADER="content-type: application/json"
168148
API_URL_BASE="https://api.localstack.cloud/v1/compute/instances"
169149
170-
source "$SHARED_SCRIPTS_PATH/retry-function.sh"
150+
source ${{ github.action_path }}/retry-function.sh
171151
fetch_logs() {
172152
local log_response
173153
log_response=$(curl --fail-with-body -s -X GET \

0 commit comments

Comments
 (0)