-
Notifications
You must be signed in to change notification settings - Fork 7
78 lines (68 loc) · 2.13 KB
/
packer.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
name: packer
on:
push:
branches:
- '**'
schedule:
- cron: '30 7 * * *'
jobs:
packer:
environment: docker-login-push
env:
PACKER_LOG: 1
PACKER_LOG_PATH: /tmp/packer.log
DOCK_USER: ${{ secrets.DOCK_USER }}
DOCK_PASS: ${{ secrets.DOCK_PASS }} # docker push for master only
PACKER_DOCKER_FILE: ${{ github.ref == 'refs/heads/master' && 'packer/lbt-docker-master.pkr.hcl' || 'packer/lbt-docker-branches.pkr.hcl' }}
runs-on: ubuntu-latest
name: Run Packer
steps:
- name: Romve useless stuff for docker size
id: size_cleanup
run: |
df -h
echo "PACKER_DOCKER_FILE: $PACKER_DOCKER_FILE"
sudo docker system prune -a -f --volumes
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
df -h
- name: Checkout
uses: actions/checkout@v4
- name: Setup `packer`
uses: hashicorp/setup-packer@main
id: setup
env:
PACKER_LOG: "0"
PRODUCT_VERSION: latest
- name: Run `packer init`
id: init
env:
PACKER_LOG: "0"
run: |
packer init "$PACKER_DOCKER_FILE"
- name: Run `packer validate`
id: validate
run: |
packer validate "$PACKER_DOCKER_FILE"
- name: Run `packer build docker pre-install`
id: pre_install
run: |
df -h
packer build -only=lbt-pre-install.docker.lbt "$PACKER_DOCKER_FILE"
- name: Run `packer build docker base-install`
id: base_install
run: |
df -h
packer build -only=lbt-base-install.docker.lbt "$PACKER_DOCKER_FILE"
- name: Run `packer build docker lbt-offensive-stuff`
id: lbt_offensive_stuff
run: |
df -h
packer build -only=lbt-offensive-stuff.docker.lbt "$PACKER_DOCKER_FILE"
- name: Run `packer build docker lbt-gui-tools`
id: lbt_gui_tools
run: |
df -h
packer build -only=lbt-gui-tools.docker.lbt "$PACKER_DOCKER_FILE"