-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
79 lines (79 loc) · 2.63 KB
/
action.yml
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
name: "7mind env action"
description: "Sets up 7mind environment"
author: "Septimal Mind"
branding:
icon: "minimize"
color: "blue"
inputs:
nuget-enable:
description: "Set up .NET/Nuget"
default: "false"
required: false
java-enable:
description: "Set up JDK"
default: "true"
required: false
java-vendor:
description: "Java vendor, e.g. microsoft"
default: "microsoft"
required: false
java-version:
description: "Java version, e.g. 11"
default: "17"
required: false
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- uses: rlespinasse/github-slug-action@v4
- uses: actions/setup-java@v4
if: ${{ inputs.java-enable == 'true' }}
with:
distribution: ${{ inputs.java-vendor }}
java-version: ${{ inputs.java-version }}
- uses: actions/cache@v4
name: Cache (SBT, Coursier, Ivy)
if: ${{ inputs.java-enable == 'true' }}
with:
path: |
~/.sbt
~/.cache/coursier
~/.ivy2/cache
/usr/local/bin/cs
key: ${{ runner.os }}-scala
# -Dsbt.ivy.home=$IVY_CACHE_FOLDER -Divy.home=$IVY_CACHE_FOLDER -Dcoursier.cache=$COURSIER_CACHE - do we still need that?
- name: Install Coursier
if: ${{ inputs.java-enable == 'true' }}
shell: bash
run: |
if [[ ! -f /usr/local/bin/cs ]]; then
curl -fL "https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz" | sudo gzip -d > /usr/local/bin/cs
sudo chmod +x /usr/local/bin/cs
fi
- name: Cache (Nuget)
if: ${{ inputs.nuget-enable == 'true' }}
uses: actions/cache@v4
with:
path: |
~/.nuget/packages
key: ${{ runner.os }}-csharp
- name: Set variables
shell: bash
run: |
{
echo "LC_ALL=C.UTF-8"
echo "CI_BRANCH=${GITHUB_REF_NAME}"
echo "CI_COMMIT=${GITHUB_SHA}"
echo "CI_BRANCH_TAG=$(git describe --contains | grep v | grep -v '~' | head -n 1 || true)"
echo "CI=true"
echo "CI_BUILD_UNIQ_SUFFIX=${GITHUB_RUN_NUMBER}.${GITHUB_RUN_ATTEMPT}.${GITHUB_RUN_ID}"
echo "CI_PULL_REQUEST=${{ github.event_name == 'pull_request' }}"
} >>"$GITHUB_ENV"
- name: Configure git
shell: bash
run: |
git config --global user.name "$USER"
git config --global user.email "build+${GITHUB_RUN_ID}+${GITHUB_SHA}@github.actions"
git config --global core.sshCommand "ssh -t -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
git config --global --get user.name
git config --global --get user.email