-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
81 lines (78 loc) · 3.07 KB
/
action.yml
File metadata and controls
81 lines (78 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# This file is maintained by Walter CI, and may be rewritten.
# https://github.com/piotr-yuxuan/walter-ci
#
# You are free to remove this project from Walter CI realm by opening
# a PR. You may also create another workflow besides this one.
name: piotr-yuxuan/walter-ci
description: Collection of utilities and helpers accessible from the comfort of your command line.
inputs:
github-token:
description: >+
To fix rate limit errors, provide `secrets.GITHUB_TOKEN` value to this field.
More info: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
default: ${{ github.token }}
required: false
no-cache:
description: Disable cache when need be
default: 'false'
required: false
runs:
using: composite
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
submodules: recursive
- run: |
set +xe
cp -r "${GITHUB_ACTION_PATH}/bash" "$HOME/.walter-ci"
cp -r "${GITHUB_ACTION_PATH}/edn-sources" "$HOME/.walter-ci/edn-sources"
mv "$HOME/.walter-ci/walter-ci.sh" "$HOME/.walter-ci/walter"
chmod +x "$HOME/.walter-ci/walter"
echo "$HOME/.walter-ci" >> $GITHUB_PATH
shell: bash
- name: Cache local Maven repository
if: ${{ inputs.no-cache != 'true' }}
uses: actions/cache@8f1e2e02865c42348f9baddbbaafb1841dce610a
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/project.clj') }}-${{ hashFiles('**/deps.edn') }}
restore-keys: ${{ runner.os }}-maven-
- name: Install Clojure CLI
uses: DeLaGuardo/setup-clojure@911bc4413d0c9a0d15a435af6a7181353a453e8c
with:
cli: latest
lein: latest
bb: latest
github-token: ${{ inputs.github-token }}
- run: GIT_ASKPASS='' git clone --depth 1 https://github.com/practicalli/clojure-deps-edn.git $XDG_CONFIG_HOME/clojure
shell: bash
- run: |
set +xe
echo "\$WALTER_VERSION=${WALTER_VERSION} initially"
WALTER_VERSION_CURRENT=$(awk '{$1=$1};1' < "${GITHUB_ACTION_PATH}/resources/walter-ci.version")
echo "\$WALTER_VERSION_CURRENT=${WALTER_VERSION_CURRENT}"
WALTER_VERSION=${WALTER_VERSION:-${WALTER_VERSION_CURRENT}}
echo "\$WALTER_VERSION=${WALTER_VERSION}"
wget "https://github.com/piotr-yuxuan/walter-ci/releases/download/${WALTER_VERSION}/walter-ci-${WALTER_VERSION}-standalone.jar" -O "$HOME/.walter-ci/walter-ci-standalone.jar"
shell: bash
- run: cp "${GITHUB_ACTION_PATH}/resources/profiles.clj" "${LEIN_HOME}/profiles.clj"
shell: bash
- run: |
mkdir -p $HOME/.m2/ || true
cp "${GITHUB_ACTION_PATH}/resources/settings.xml" "$HOME/.m2/settings.xml"
shell: bash
- name: Sanity checks, and first aid debug info
shell: bash
run: |
set +xe
echo "\$HOME=${HOME}"
echo "\$${LEIN_HOME}=${LEIN_HOME}"
tree -Chup "${HOME}/.walter-ci" || true
tree -Chup "${LEIN_HOME}" || true
env
true
author: Piotr Yuxuan
branding:
icon: command
color: orange