-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
95 lines (85 loc) · 2.3 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: 'IcePAK'
description: 'Pushes built image to polar server'
author: Zack Siri
branding:
color: blue
icon: terminal
inputs:
alpine:
description: |
Alpine linux version to use (edge | v3.19 | v3.18 | v3.17 | v3.16)
required: true
arch:
description: |
Alpine linux version to use (x86_64 | aarch64)
required: true
runs:
using: "composite"
steps:
- name: Initial Setup
run: |
mkdir -p ~/.mix
mkdir -p ~/go
sudo apt-get update
sudo apt-get install -y debootstrap rsync gpg squashfs-tools
shell: bash
- name: Cache Distrobuilder
id: cache-distrobuilder
uses: actions/cache@v4
with:
path: ~/go/bin
key: ${{ runner.arch }}-distrobuilder-main
- uses: actions/setup-go@v5
if: steps.cache-distrobuilder.outputs.cache-hit != 'true'
with:
go-version: '>=1.21.0'
cache: false
- name: Setup Distrobuilder
if: steps.cache-distrobuilder.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install -y git make
mkdir -p ~/go/src/github.com/lxc/
cd ~/go/src/github.com/lxc/
git clone --depth 1 --branch main https://github.com/lxc/distrobuilder
cd ./distrobuilder
make
shell: bash
- name: Prepare Distrobuilder Path
run: |
echo "/home/runner/go/bin" >> $GITHUB_PATH
shell: bash
- name: Setup Alpine
uses: upmaru/setup-alpine@develop
with:
branch: ${{ inputs.alpine }}
arch: ${{ inputs.arch }}
packages: |
zip
tar
sudo
cmake
elixir
coreutils
alpine-sdk
volumes: |
/home/runner/.mix:/home/runner/.mix
- name: Prepare IcePAK Path
run: |
echo "/home/runner/.mix/escripts" >> $GITHUB_PATH
shell: alpine.sh {0}
- name: Cache IcePAK
id: cache-icepak
uses: actions/cache@v4
with:
path: ~/.mix
key: ${{ runner.arch }}-icepak-1.0.8
- name: Install Pakman
if: steps.cache-icepak.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix escript.install hex icepak 1.0.8 --force
shell: alpine.sh {0}
env:
MIX_ENV: prod