-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
64 lines (64 loc) · 2.19 KB
/
action.yml
File metadata and controls
64 lines (64 loc) · 2.19 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
name: "7mind env action"
description: "Sets up 7mind environment"
author: "Septimal Mind"
branding:
icon: "minimize"
color: "blue"
inputs:
setup-nix:
description: "Setup Nix"
default: true
required: false
cache-scala:
description: "Cache Scala artifacts"
default: true
required: false
reclaim-disk:
description: "Remove agent junk before build"
default: false
required: false
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- uses: rlespinasse/github-slug-action@v4
- uses: wimpysworld/nothing-but-nix@v4
if: ${{ inputs.reclaim-disk == 'true' }}
with:
hatchet-protocol: "rampage"
- name: Install Nix
if: ${{ runner.environment == 'github-hosted' && runner.os != 'Windows' && inputs.setup-nix == 'true' }}
uses: DeterminateSystems/nix-installer-action@v20
# dead
# - name: Cache Nix
# if: ${{ runner.environment == 'github-hosted' && runner.os != 'Windows' && inputs.setup-nix == 'true' }}
# uses: DeterminateSystems/magic-nix-cache-action@main
- 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
- uses: actions/cache@v4
name: Cache (SBT, Ivy, Coursier)
if: ${{ inputs.cache-scala == 'true' }}
with:
path: |
~/.sbt
~/.cache/coursier
~/.ivy2/cache
key: ${{ runner.os }}-scala