fix build issue with cache causing pacman problems
All checks were successful
Gitea Actions Demo / build-arch-toolbox (push) Successful in 6m9s

This commit is contained in:
2024-11-26 19:50:45 -05:00
parent 5495011d49
commit 4d24970e04
6 changed files with 20 additions and 25 deletions

View File

@@ -22,3 +22,4 @@ jobs:
file: ${{ gitea.workspace }}/infrastructure/graduated/fedora/Containerfile
push: true
tags: "gitea.reeseapps.com/services/arch-toolbox:latest,gitea.reeseapps.com/services/arch-toolbox:${{gitea.sha}}"
no-cache: true

View File

@@ -1,5 +1,9 @@
# Homelab
Reese's Arch Toolbox Status:
![Arch Toolbox Status](https://gitea.reeseapps.com/services/homelab/actions/workflows/build.yaml/badge.svg?branch=main)
A project to store homelab stuff.
## Table of Contents

View File

@@ -1,5 +1,14 @@
FROM quay.io/toolbx/arch-toolbox:latest
# Pacman Setup
# Enable multilib
RUN tee -a /etc/pacman.conf <<EOF
[multilib]
Include = /etc/pacman.d/mirrorlist
EOF
# Set architecture to x86_64 manually because auto doesn't work.
RUN sed -i 's/Architecture = auto/Architecture = x86_64/' /etc/pacman.conf
# Get updates
RUN pacman -Syu --noconfirm
# Install zsh
@@ -38,11 +47,7 @@ RUN ./aws/install
RUN pacman -S --noconfirm podman
# Wine
COPY <<EOF /etc/pacman.conf
[multilib]
Include = /etc/pacman.d/mirrorlist
EOF
RUN pacman -Syu --noconfirm wine
RUN pacman -Sy --noconfirm wine
##### RUN LAST #####

View File

@@ -2,6 +2,7 @@
# Build latest image
podman build \
--no-cache \
-t gitea.reeseapps.com/services/arch-toolbox:latest \
-t gitea.reeseapps.com/services/arch-toolbox:$(date +%s) \
-f ./infrastructure/graduated/fedora/Containerfile

View File

@@ -1,6 +0,0 @@
#!/bin/bash
podman image ls \
-f 'reference=gitea.reeseapps.com/services/arch-toolbox:latest' \
-n --no-trunc --format '{{ .Repository }}:{{ .Tag }}' \
| xargs -I {} podman push {}

View File

@@ -347,8 +347,8 @@ You can build and run the image wit this (See `Containerfile` in this directory)
```bash
# Build latest image
podman build \
--no-cache \
-t gitea.reeseapps.com/services/arch-toolbox:latest \
-t gitea.reeseapps.com/services/arch-toolbox:$(date +%s) \
-f ./infrastructure/graduated/fedora/Containerfile
# Test with podman
@@ -363,16 +363,6 @@ toolbox create -i gitea.reeseapps.com/services/arch-toolbox:latest
SHELL=/bin/zsh toolbox enter
```
You can push the image up to your registry like normal:
```bash
# Push all tags for the "latest" image
podman image ls \
-f 'reference=gitea.reeseapps.com/services/arch-toolbox:latest' \
-n --no-trunc --format '{{ .Repository }}:{{ .Tag }}' \
| xargs -I {} podman push {}
```
In vscode you can set this as your default build task for homelab and trigger it with
`ctrl shift B`