Skip to content

Commit e428e4e

Browse files
authored
Merge branch 'master' into cache-config-improvement
2 parents 62daff0 + 10f696c commit e428e4e

File tree

931 files changed

+17372
-8264
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

931 files changed

+17372
-8264
lines changed

.github/actions/clean/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Clean runner
2+
description: Clean the runner's temp path on ending
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Clean
7+
shell: bash
8+
run: |
9+
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
10+
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
11+
sudo rm -fr "${{runner.temp}}"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Common setup
2+
description: Setup necessary environments
3+
inputs:
4+
job_type:
5+
description: the name to use in the TEMP_PATH and REPO_COPY
6+
default: common
7+
type: string
8+
nested_job:
9+
description: the fuse for unintended use inside of the reusable callable jobs
10+
default: true
11+
type: boolean
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Setup and check ENV
16+
shell: bash
17+
run: |
18+
echo "Setup the common ENV variables"
19+
cat >> "$GITHUB_ENV" << 'EOF'
20+
TEMP_PATH=${{runner.temp}}/${{inputs.job_type}}
21+
REPO_COPY=${{runner.temp}}/${{inputs.job_type}}/git-repo-copy
22+
EOF
23+
if [ -z "${{env.GITHUB_JOB_OVERRIDDEN}}" ] && [ "true" == "${{inputs.nested_job}}" ]; then
24+
echo "The GITHUB_JOB_OVERRIDDEN ENV is unset, and must be set for the nested jobs"
25+
exit 1
26+
fi
27+
- name: Setup $TEMP_PATH
28+
shell: bash
29+
run: |
30+
# to remove every leftovers
31+
sudo rm -fr "$TEMP_PATH"
32+
mkdir -p "$REPO_COPY"
33+
cp -a "$GITHUB_WORKSPACE"/. "$REPO_COPY"/

0 commit comments

Comments
 (0)