Action: build custom image

This commit is contained in:
Jérémie SALVI
2024-12-21 19:15:06 +01:00
parent d35c435984
commit 68aca9ccaa
2 changed files with 10 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
name: Build And Test name: Build and push runner-custom image
run-name: ${{ gitea.actor }} is runs ci pipeline run-name: ${{ gitea.actor }} is runs ci pipeline
on: [ push ] on: [ push ]
@@ -7,16 +7,11 @@ jobs:
runs-on: runner-custom runs-on: runner-custom
if: gitea.ref == 'refs/heads/main' if: gitea.ref == 'refs/heads/main'
steps: steps:
- uses: https://github.com/actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Docker Buildx - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
uses: https://github.com/docker/setup-buildx-action@v3 run: |
with: ls ${{ gitea.workspace }}
config-inline: | run: |
[registry."git.unixyourbrain.org"] cd ${{ gitea.workspace }}
- name: Build and push Docker image run: |
uses: https://github.com/docker/build-push-action@v5 pwd
with:
context: .
file: ./Dockerfile
push: true
tags: git.unixyourbrain.org/runner-custom:${{gitea.sha}},git.unixyourbrain.org/runner-custom:latest

View File

@@ -3,5 +3,4 @@ FROM archlinux:latest
RUN pacman -Sy --noconfirm RUN pacman -Sy --noconfirm
RUN pacman -S --noconfirm docker docker-buildx docker-compose && rm /var/cache/pacman/pkg/* RUN pacman -S --noconfirm docker docker-buildx docker-compose && rm /var/cache/pacman/pkg/*
RUN pacman -S --noconfirm git && rm /var/cache/pacman/pkg/* RUN pacman -S --noconfirm git && rm /var/cache/pacman/pkg/*
RUN pacman -S --noconfirm npm && rm /var/cache/pacman/pkg/*
RUN mkdir -p /workspace