Skip to content

Commit 884f197

Browse files
committed
💄 Put generated action into allowed workdir
1 parent 271cf3c commit 884f197

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

action.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,20 +131,16 @@ runs:
131131
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
132132
PR_REPO_ID: ${{ github.event.pull_request.base.repo.id }}
133133
- name: Create Docker container action
134-
id: intermediate-action
135134
run: |
136135
# Create Docker container action
137136
python ${{ github.action_path }}/create-docker-action.py
138-
echo "path=$(realpath -s --relative-to=. '${{
139-
github.action_path
140-
}}')" | tee -a "${GITHUB_OUTPUT}"
141137
env:
142138
REF: ${{ steps.set-repo-and-ref.outputs.ref }}
143139
REPO: ${{ steps.set-repo-and-ref.outputs.repo }}
144140
REPO_ID: ${{ steps.set-repo-and-ref.outputs.repo-id }}
145141
shell: bash
146142
- name: Run Docker container
147-
uses: ${{ steps.intermediate-action.outputs.path }}/.github/actions/run-docker-container
143+
uses: .github/.tmp/.generated-actions/run-pypi-publish-in-docker-container
148144
with:
149145
user: ${{ inputs.user }}
150146
password: ${{ inputs.password }}

create-docker-action.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ def set_image(ref: str, repo: str, repo_id: str) -> str:
7070
},
7171
}
7272

73-
action_path = pathlib.Path('.github/actions/run-docker-container/action.yml')
73+
action_path = pathlib.Path(
74+
'.github/.tmp/.generated-actions/'
75+
'run-pypi-publish-in-docker-container/action.yml',
76+
)
7477
action_path.parent.mkdir(parents=True, exist_ok=True)
7578
action_path.write_text(json.dumps(action, ensure_ascii=False), encoding='utf-8')

0 commit comments

Comments
 (0)