This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: [k8s, kaniko]
|
||||
steps:
|
||||
- name: Instalar y ejecutar Buildah
|
||||
env:
|
||||
NEXUS_USER: ${{ secrets.NEXUS_USER }}
|
||||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
||||
run: |
|
||||
echo "📦 Instalando Buildah"
|
||||
sed -i 's|http://archive.ubuntu.com/ubuntu/|http://mirrors.kernel.org/ubuntu/|g' /etc/apt/sources.list
|
||||
apt-get update -y -qq
|
||||
apt-get install -y buildah
|
||||
|
||||
#echo "🔐 Configurando credenciales para el registro"
|
||||
#echo "[[registry]]" > /etc/containers/registries.conf
|
||||
#echo "prefix = \"nexus.rancherk3.duckdns.org\"" >> /etc/containers/registries.conf
|
||||
#echo "location = \"nexus.rancherk3.duckdns.org\"" >> /etc/containers/registries.conf
|
||||
#echo "insecure = true" >> /etc/containers/registries.conf
|
||||
|
||||
#echo "Iniciando sesión en el registro"
|
||||
#echo $NEXUS_PASSWORD | buildah login -u $NEXUS_USER --password-stdin nexus.rancherk3.duckdns.org
|
||||
|
||||
export BUILDAH_ISOLATION=chroot
|
||||
export STORAGE_DRIVER=vfs
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
echo "🚀 Construyendo imagen con Buildah"
|
||||
buildah bud -f Dockerfile -t nexus.rancherk3.duckdns.org/tfm/microserviciospython:latest .
|
||||
|
||||
buildah tag nexus.rancherk3.duckdns.org/tfm/microserviciospython:latest nexus.rancherk3.duckdns.org/tfm/microserviciospython:${GITHUB_SHA}
|
||||
|
||||
echo "🚀 Subiendo imágenes"
|
||||
buildah push nexus.rancherk3.duckdns.org/tfm/microserviciospython:latest
|
||||
buildah push nexus.rancherk3.duckdns.org/tfm/microserviciospython:${GITHUB_SHA}
|
||||
|
||||
echo "✅ Imagen construida y subida exitosamente"
|
||||
Reference in New Issue
Block a user