feat: migrate to gitea actions
All checks were successful
Build / build (pull_request) Successful in 1m23s

- change from droneci to gitea actions
- update Dockerfile cleanup stage
This commit is contained in:
Ben Vincent 2024-09-08 01:59:22 +10:00
parent cd2631d74c
commit 4926c57c30
5 changed files with 70 additions and 56 deletions

View File

@ -1,53 +0,0 @@
kind: pipeline
type: docker
name: build-docker-image
steps:
- name: build
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- apk add --no-cache make bash git
- make build
- name: push
image: docker:dind
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
volumes:
- name: dockersock
path: /var/run/docker.sock
when:
branch:
- master
event:
- push
commands:
- apk add --no-cache make bash git
- echo "$DOCKER_PASSWORD" | docker login --username=$DOCKER_USERNAME --password-stdin git.query.consul
- make push
- name: clean
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- apk add --no-cache make bash git
- make clean
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
trigger:
event:
- push
- pull_request

View File

@ -0,0 +1,26 @@
name: Build
on:
pull_request:
jobs:
build:
runs-on: almalinux-8
container:
image: git.query.consul/unkin/almalinux8:latest
options: --privileged
steps:
- name: Set up environment
run: |
dnf install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf module enable -y nodejs:20
dnf install -y docker-ce-cli make bash git nodejs
- name: Checkout code
uses: actions/checkout@v3
- name: Build Docker Image
run: |
make build

View File

@ -0,0 +1,39 @@
name: Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: almalinux-8
container:
image: git.query.consul/unkin/almalinux8:latest
options: --privileged
steps:
- name: Set up environment
run: |
dnf install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf module enable -y nodejs:20
dnf install -y docker-ce-cli make bash git nodejs
- name: Checkout code
uses: actions/checkout@v3
- name: Build Docker Image
run: |
make build
- name: Log in to Docker
env:
UPLOAD_USER: ${{ secrets.UPLOAD_USER }}
UPLOAD_PASS: ${{ secrets.UPLOAD_PASS }}
run: |
echo "$UPLOAD_PASS" | docker login --username=$UPLOAD_USER --password-stdin git.query.consul
- name: Push Docker Image
run: |
make push

View File

@ -17,6 +17,8 @@ RUN dnf clean all && \
# Update the system and install required packages
RUN dnf update -y && \
dnf install -y curl git && \
dnf clean all && \
dnf install -y curl git
# Cleanup
RUN dnf clean all && \
rm -rf /var/cache/dnf

View File

@ -2,5 +2,5 @@
[![Build Status](https://droneci.query.consul/api/badges/unkin/docker-almalinux-base/status.svg)](https://droneci.query.consul/unkin/docker-almalinux-base)
This project provides a reproducible Docker image build process for `almalinux:8.10`, with custom YUM repository configurations and package installations. The build is automated using a `Makefile` and managed via Drone CI to ensure consistent and reliable Docker image builds.
This project provides a reproducible Docker image build process for `almalinux:8.10`, with custom YUM repository configurations and package installations. The build is automated using a `Makefile` and managed via CI tasks to ensure consistent and reliable Docker image builds.