Skip to content

Commit 36ed82f

Browse files
authored
commit
1 parent fa9358b commit 36ed82f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

action.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Initialize job for hosted and self-hosted runner usage'
2+
description: Pre-fetch upload-artifact (if self-hosted) and checkout repo
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Pre-fetch upload-artifact action (self-hosted only) ⚙️
7+
if: contains(runner.labels, 'self-hosted')
8+
shell: bash
9+
run: |
10+
mkdir -p ~/.setup-actions
11+
cd ~/.setup-actions
12+
if [ ! -d "upload-artifact" ]; then
13+
echo "Cloning upload-artifact@v4..."
14+
git clone --depth=1 --branch v4 https://github.com/actions/upload-artifact.git upload-artifact
15+
echo "✅ upload-artifact@v4 cloned manually!"
16+
else
17+
echo "✅ upload-artifact already fetched."
18+
fi
19+
20+
- name: Checkout repo 📦
21+
uses: actions/checkout@v4

0 commit comments

Comments
 (0)