Skip to content

Commit e36b8c1

Browse files
committed
🧪Reuse existing action checkout as trampoline
Previously, the action repository was being cloned from the remote twice, unnecessarily. This patch attempts to eliminate this step and use the copy that was checked out on job start.
1 parent 0d02f37 commit e36b8c1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

action.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,6 @@ runs:
130130
PR_REF: ${{ github.event.pull_request.head.ref }}
131131
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
132132
PR_REPO_ID: ${{ github.event.pull_request.base.repo.id }}
133-
- name: Check out action repo
134-
uses: actions/checkout@v4
135-
with:
136-
path: action-repo
137-
ref: ${{ steps.set-repo-and-ref.outputs.ref }}
138-
repository: ${{ steps.set-repo-and-ref.outputs.repo }}
139133
- name: Create Docker container action
140134
run: |
141135
# Create Docker container action
@@ -145,9 +139,9 @@ runs:
145139
REPO: ${{ steps.set-repo-and-ref.outputs.repo }}
146140
REPO_ID: ${{ steps.set-repo-and-ref.outputs.repo-id }}
147141
shell: bash
148-
working-directory: action-repo
142+
working-directory: ${{ github.action_path }}
149143
- name: Run Docker container
150-
uses: ./action-repo/.github/actions/run-docker-container
144+
uses: ${{ github.action_path }}/.github/actions/run-docker-container
151145
with:
152146
user: ${{ inputs.user }}
153147
password: ${{ inputs.password }}

0 commit comments

Comments
 (0)