full try - v1 #53
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: packer | |
on: | |
push: | |
env: | |
PRODUCT_VERSION: "latest" | |
jobs: | |
packer: | |
runs-on: ubuntu-latest | |
name: Run Packer | |
steps: | |
- name: Romve useless stuff for docker size | |
id: size_cleanup | |
run: | | |
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 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup `packer` | |
uses: hashicorp/setup-packer@main | |
id: setup | |
with: | |
version: ${{ env.PRODUCT_VERSION }} | |
# - name: DEBUG | |
# id: debug | |
# run: | | |
# set -x | |
# ls -lah | |
# id | |
# uname -a | |
# df -h | |
# sudo sed -i 's#ExecStart=/usr/bin/dockerd#ExecStart=/usr/bin/dockerd --storage-opt dm.basesize=20G#g' /usr/lib/systemd/system/docker.service | |
# cat /usr/lib/systemd/system/docker.service | grep -iF storage | |
# sudo systemctl restart docker | |
# sleep 3 | |
# sudo systemctl status docker | |
- name: Run `packer init` | |
id: init | |
run: "cd packer && packer init ./lbt-docker.pkr.hcl" | |
- name: Run `packer validate` | |
id: validate | |
run: "cd packer && packer validate ./lbt-docker.pkr.hcl" | |
- name: Run `packer build docker pre-install` | |
id: pre_install | |
run: | | |
cd packer | |
df -h | |
export PACKER_LOG=1 | |
export PACKER_LOG_PATH=/dev/stdout | |
packer build -only=lbt-pre-install.docker.lbt lbt-docker.pkr.hcl | |
- name: Run `packer build docker base-install` | |
id: base_install | |
run: | | |
cd packer | |
df -h | |
export PACKER_LOG=1 | |
export PACKER_LOG_PATH=/dev/stdout | |
packer build -only=lbt-base-install.docker.lbt lbt-docker.pkr.hcl | |
- name: Run `packer build docker lbt-offensive-stuff` | |
id: lbt_offensive_stuff | |
run: | | |
cd packer | |
df -h | |
export PACKER_LOG=1 | |
export PACKER_LOG_PATH=/dev/stdout | |
packer build -only=lbt-offensive-stuff.docker.lbt lbt-docker.pkr.hcl | |
- name: Run `packer build docker lbt-gui-tools` | |
id: lbt_gui_tools | |
run: | | |
cd packer | |
df -h | |
export PACKER_LOG=1 | |
export PACKER_LOG_PATH=/dev/stdout | |
packer build -only=lbt-gui-tools.docker.lbt lbt-docker.pkr.hcl |