feat: migrate to gitea actions
All checks were successful
Build / build (pull_request) Successful in 1m23s
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:
parent
cd2631d74c
commit
4926c57c30
53
.drone.yml
53
.drone.yml
@ -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
|
||||
26
.gitea/workflows/build.yaml
Normal file
26
.gitea/workflows/build.yaml
Normal 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
|
||||
39
.gitea/workflows/deploy.yaml
Normal file
39
.gitea/workflows/deploy.yaml
Normal 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
|
||||
@ -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
|
||||
|
||||
@ -2,5 +2,5 @@
|
||||
|
||||
[](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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user