Compare commits

..

37 Commits

Author SHA1 Message Date
116de4f9f1 Building a test image for minecraft
All checks were successful
Build Minecraft Image / build-minecraft-image (push) Successful in 7s
Build Minecraft Image / push-to-docker-hub (push) Successful in 9s
2024-12-10 17:00:59 -08:00
9771afebb0 Installing standalonebinary for hugo to get latest version
All checks were successful
Build Ansible Image / build-ansible-image (push) Successful in 25s
Build Hugo Image / build-hugo-image (push) Successful in 9s
Build Ansible Image / push-to-docker-hub (push) Successful in 11s
Build Hugo Image / push-to-docker-hub (push) Successful in 13s
2024-09-29 22:53:43 -07:00
23516993e5 Dockerfile git addition 2024-09-29 21:51:31 -07:00
ec7c4b2b65 Fixing remaining packaging issues
All checks were successful
Build Ansible Image / build-ansible-image (push) Successful in 26s
Build Ansible Image / push-to-docker-hub (push) Successful in 11s
2024-09-29 21:36:27 -07:00
a54ded29e8 Fixing push paths
Some checks failed
Build Ansible Image / build-ansible-image (push) Failing after 19s
Build Ansible Image / push-to-docker-hub (push) Failing after 2s
2024-09-29 18:24:09 -07:00
79835d2560 Building ansible image now 2024-09-29 18:14:06 -07:00
3bd16a1efd Bringing in my own version of srueda99s scp-action for my own use :) 2024-09-25 19:37:11 -07:00
1e6222dfd8 Using a new base image for hugo builds
All checks were successful
Build Hugo Image / build-hugo-image (push) Successful in 52s
Build Hugo Image / push-to-docker-hub (push) Successful in 15s
2024-09-03 15:40:14 -07:00
9cafba8d91 Only build when we push to the website directory 2024-08-27 18:55:29 -07:00
bb69d9f5ec Job for pushing to docker hub
All checks were successful
Build Hugo Image / build-hugo-image (push) Successful in 5s
Simple Docker Hello World Test / hello-world (push) Successful in 5s
Build Hugo Image / push-to-docker-hub (push) Successful in 12s
2024-08-27 18:53:17 -07:00
d6a4b3314c Cloning as a prestep
All checks were successful
Build Hugo Image / build-hugo-image (push) Successful in 19s
Simple Docker Hello World Test / hello-world (push) Successful in 4s
2024-08-27 18:08:45 -07:00
277f313a6c Finding files
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 2s
Simple Docker Hello World Test / hello-world (push) Successful in 7s
2024-08-27 18:07:20 -07:00
5393200d1d Debug info and proper args order for docker build
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 2s
Simple Docker Hello World Test / hello-world (push) Successful in 5s
2024-08-27 18:05:31 -07:00
72f6f5d0d3 Docker build path fix
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 1s
Simple Docker Hello World Test / hello-world (push) Successful in 5s
2024-08-27 18:03:33 -07:00
bc835b45ef Building hugo image
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 2s
Simple Docker Hello World Test / hello-world (push) Successful in 6s
2024-08-27 18:02:15 -07:00
4d54b9aad7 Quick files test
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 3s
Simple Docker Hello World Test / hello-world (push) Successful in 5s
2024-08-27 17:59:49 -07:00
844cef19fd Quick files test
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 4s
Simple Docker Hello World Test / hello-world (push) Successful in 6s
2024-08-27 17:58:44 -07:00
9e181eda49 testing default container
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 3s
Simple Docker Hello World Test / hello-world (push) Successful in 46s
2024-08-27 16:14:25 -07:00
6de0f13416 extracting path
Some checks failed
Build Hugo Image / build-hugo-image (push) Successful in 2s
Simple Docker Hello World Test / hello-world (push) Failing after 3s
2024-08-27 16:06:32 -07:00
8e1b209405 Converting object to json
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 1s
Simple Docker Hello World Test / hello-world (push) Failing after 3s
2024-08-27 15:58:36 -07:00
a1587364e6 Dumping env var data
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 2s
Simple Docker Hello World Test / hello-world (push) Failing after 3s
2024-08-27 15:57:59 -07:00
33862002e7 Fixing labels for container
Some checks failed
Build Hugo Image / build-hugo-image (push) Waiting to run
Simple Docker Hello World Test / hello-world (push) Failing after 13s
2024-08-26 21:29:27 -07:00
e510e63c67 debuggin t hings
Some checks are pending
Build Hugo Image / build-hugo-image (push) Successful in 2s
Simple Docker Hello World Test / hello-world (push) Waiting to run
2024-08-26 21:09:50 -07:00
c8e6e2c797 bro
All checks were successful
Build Hugo Image / build-hugo-image (push) Successful in 2s
Simple Docker Hello World Test / hello-world (push) Successful in 2s
2024-08-26 21:08:21 -07:00
10581e5d5d Fixing path
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 2s
Simple Docker Hello World Test / hello-world (push) Successful in 2s
2024-08-26 21:07:25 -07:00
eaf41baf22 Using docker:dind-stable for hugo build
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 7s
Simple Docker Hello World Test / hello-world (push) Successful in 2s
2024-08-26 21:03:38 -07:00
a806905b40 Simple hugo builder test
Some checks failed
Build Hugo Image / build-hugo-image (push) Failing after 0s
Simple Docker Hello World Test / hello-world (push) Successful in 1s
2024-08-26 20:52:57 -07:00
7827745c11 test workflow for building out gitea based ci'
All checks were successful
Simple Docker Hello World Test / hello-world (push) Successful in 5s
2024-08-26 16:32:44 -07:00
0a1f221b40 Selnium with python3 2024-03-29 15:42:09 -07:00
b0b2a3e950 BUilding selenium 2024-03-24 19:02:42 -07:00
980f487f4b Adding login for docker hub 2024-03-24 19:01:31 -07:00
df4c0a12fa Reducing docker size for hugo builds 2023-10-08 20:23:45 -07:00
99bac4e6e1 Smaller website image 2023-10-02 20:38:11 -07:00
7de41c8bfd Sampling the pipeline for the build script 2023-01-16 19:12:04 -08:00
6ad30d3826 Missing bash prefix" 2023-01-16 18:41:51 -08:00
a7d09be523 New pipeline which may/may not work 2023-01-16 18:39:57 -08:00
f86c841167 - Removing fluff pipeline 2022-05-17 15:31:31 -07:00
16 changed files with 351 additions and 27 deletions

View File

@@ -0,0 +1,29 @@
name: Build Ansible Image
on:
push:
branches:
- master
paths:
- ansible/*
env:
image: shockrah/ansible
jobs:
build-ansible-image:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build docker image
run: docker build -t ${{ env.image }} ${{ gitea.workspace }}/ansible
push-to-docker-hub:
needs: bulid-anisble-image
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
run: |
echo "${{ secrets.dockerhub_pass }}" | \
docker login -u ${{ secrets.dockerhub_user }} --password-stdin
- name: Push Docker image from previous job
run: docker push ${{ env.image }}

View File

@@ -0,0 +1,30 @@
name: Build Hugo Image
on:
push:
branches:
- master
paths:
- website/*
env:
image: shockrah/hugo
jobs:
build-hugo-image:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build docker image
run: docker build -t ${{ env.image }} ${{ gitea.workspace }}/website
push-to-docker-hub:
needs: build-hugo-image
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
run: |
echo "${{ secrets.dockerhub_pass }}" | \
docker login -u ${{ secrets.dockerhub_user }} --password-stdin
- name: Push Docker image from previous job
run: docker push ${{ env.image }}

View File

@@ -0,0 +1,29 @@
name: Build Minecraft Image
on:
push:
branches:
- master
paths:
- minecraft/*
env:
image: shockrah/minecraft
jobs:
build-minecraft-image:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build docker image
run: docker build -t ${{ env.image }} ${{ gitea.workspace }}/website
push-to-docker-hub:
needs: build-hugo-image
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
run: |
echo "${{ secrets.dockerhub_pass }}" | \
docker login -u ${{ secrets.dockerhub_user }} --password-stdin
- name: Push Docker image from previous job
run: docker push ${{ env.image }}

View File

@@ -1,11 +1,19 @@
stages:
- build
include:
- local: 'ci/builder.yml'
dummy:
stage: build
image: alpine:latest
build-ansible-image:
extends: .builder
script:
- echo $env_var
- echo $env_file
- cat $env_file
- sh build-image.sh ansible
build-website-image:
extends: .builder
script:
- sh build-image.sh website
build-selelium-image:
extends: .builder
script:
- sh build-image.sh selenium

View File

@@ -1,16 +1,12 @@
# Inpsired by William Yeh's Docker image however this one is kept up to date
# with the latest base image versions available
# with the latest base image versions available, and includes ansible-lint
FROM alpine:latest
MAINTAINER shockrah :^)
RUN apk --update add sudo python3 openssl ca-certificates openssh-client rsync && \
RUN apk --update add sudo python3 git openssl ca-certificates openssh-client rsync && \
apk --update add --virtual build-dependencies \
python3-dev libffi-dev openssl-dev build-base && \
python3 -m ensurepip && \
pip3 install --upgrade pip cffi && \
pip3 install ansible && \
python3-dev libffi-dev openssl-dev build-base \
ansible py3-ansible-lint && \
apk del build-dependencies && \
rm -rf /var/cache/apk/* && \
mkdir -p /etc/ansible && \
@@ -19,6 +15,4 @@ RUN apk --update add sudo python3 openssl ca-certificates openssh-client rsync &
CMD ["ansible-playbook", "--version"]

35
build-image.sh Normal file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
set -e
# This script is a generic builder script which only builds
# images if the latest commit modifies the given folder in some way
target="$1"
tag="$2"
# Ensure we have a target
if [ -z "$target" ]; then
echo "$target is not defined ( empty )"
exit 1
fi
# Make sure the target is real
if [ ! -d "$target" ]; then
echo "$target is not a directory"
exit 1
fi
# Set the tag if not already set
if [ -z "$tag" ]; then
tag=latest
echo "Tag for \"$target\" defaulting to \"latest\""
fi
# Finally set the project root
PROJECT_ROOT=`pwd`
cd "$target"
echo docker build . -t "$tag"
echo "${DOCKERHUB_PASSWORD} | docker login --username "${DOCKERHUB_USERNAME}" --password-stdin
cd "$PROJECT_ROOT"

17
ci/builder.yml Normal file
View File

@@ -0,0 +1,17 @@
# This template is for the main builder jobs to inherit generic properties from
stages:
- publish
.builder:
image: docker:stable
stage: publish
services:
- docker:dind
only:
refs:
- master
# Login to the docker registry to push
before_script:
- docker login -u $DOCKER_USERNAME --password-stdin <<< $TOKEN

3
minecraft/Dockerfile Normal file
View File

@@ -0,0 +1,3 @@
# Super basic test thing
FROM itzg/minecraft-server
ENV EULA=TRUE

View File

@@ -3,12 +3,19 @@
This repository serves as a place of consolidation for most of the major public
docker images that I maintain.
# Building
Workflow for is defined as such in 3 stages:
* Validation stage: where we lint and check any
# Update Cycle
I mostly update these for my own sake however special versioning cycles can be
arranged for those that that request it.
Email: `dev@shockrah.xyz`
Email: `mail@shockrah.xyz`
# Contributing

11
scp-action/Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
# Runs on Alpine container, latest version.
FROM alpine
# Copy the content to the container.
COPY . /
# Grant executable permission on the script.
RUN ["chmod", "+x", "/entrypoint.sh"]
# Update the apk and download openssh
RUN ["apk", "update"]
RUN ["apk", "add", "git", "openssh"]
# Runs the script.
ENTRYPOINT [ "/entrypoint.sh" ]

21
scp-action/LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Sebastian Rueda
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

78
scp-action/README.md Normal file
View File

@@ -0,0 +1,78 @@
# SCP ACTION
***By `SRUEDA99`***
Forked by `shockrah` with minor improvement in the `entrypoint.sh`
file for my own personal use.
## Overview
This action to copy the files from your repository to a remote server using **SCP** (Secure Copy Protocol).
## How to use it
You must give:
- The `host` which is the public address or the public DNS of the destination server.
- The `username` that will be used in the remote server.
- The `destination` folder, where the content will be copied.
- The `password` for the user or the private `key` in case the connection is based on SSH keys.
Optional:
- The `origin` folder is set by default as __"./*"__ but you can also specify it.
- The `port` is set as **22** by default, you can also specify another one.
- The `passphrase` if necessary.
**IMPORTANT**
```
Use Github secrets to give these parameters.
```
## Examples
**With password**
```
name: copy using password
uses: srueda99/scp-action@v12
with:
port: 22
host: ${{ secrets.SERVER_ADDRESS }}
destination: "/home/${{ secrets.SERVER_USERNAME }}/"
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
```
**With key**
```
name: copy using key
uses: srueda99/scp-action@v12
with:
port: 22
host: ${{ secrets.SERVER_ADDRESS }}
destination: "/home/${{ secrets.SERVER_USERNAME }}/"
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_KEY }}
```
**With origin folder**
```
name: copy using password
uses: srueda99/scp-action@v12
with:
port: 22
host: ${{ secrets.SERVER_ADDRESS }}
origin: "./*"
destination: "/home/${{ secrets.SERVER_USERNAME }}/"
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
```
**With passphrase**
```
name: copy using key
uses: srueda99/scp-action@v12
with:
port: 22
host: ${{ secrets.SERVER_ADDRESS }}
destination: "/home/${{ secrets.SERVER_USERNAME }}/"
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_KEY }}
passphrase: ${{ secrets.SERVER_PASSPHRASE }}
```
_Enjoy it!_

39
scp-action/action.yml Normal file
View File

@@ -0,0 +1,39 @@
name: 'SCP Deployment'
description: 'Copies the files from your repository to a remote host using SCP'
author: 'Sebastian Rueda'
inputs:
# $1
port:
description: 'Port for SCP'
default: 22
# $2
host:
description: 'IP Address or DNS of your target host'
# $3
origin:
description: 'Source route folder'
default: "./*"
# $4
destination:
description: 'Destination route folder'
# $5
username:
description: 'User for remote connection'
# $6
password:
description: 'Password for the user'
# $7
key:
description: 'Private SSH key'
# $8
passphrase:
description: 'Passphrase for SSH key'
outputs:
time:
description: 'Returns the time when the script ran'
runs:
using: 'docker'
image: 'Dockerfile'
branding:
icon: 'send'
color: 'black'

21
scp-action/entrypoint.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/sh -l
# Checking if the key input is not empty
if [[ "$INPUT_KEY" ]]; then
# If it is not empty, it uses the key for the SCP
echo -e "${INPUT_KEY}" > key # Creates a file with the key content
chmod 400 key # Set the key as Read-Only
echo "Trying SCP process with SSH key"
# Runs the SCP command
scp -P $INPUT_PORT -o StrictHostKeyChecking=no -i key $INPUT_ORIGIN "$INPUT_USERNAME"@"$INPUT_HOST":"$INPUT_DESTINATION"
else
# If the keyis empty, it uses the password for the SCP
echo "Trying SCP process with password"
# Runs the SCP command
sshpass -p $INPUT_PASSWORD scp -P $INPUT_PORT -o StrictHostKeyChecking=no -r $INPUT_ORIGIN "$INPUT_USERNAME"@"$INPUT_HOST":"$INPUT_DESTINATION"
fi
time=$(date)
echo "-----------------------------"
echo "| Files copied successfully |"
echo "-----------------------------"
echo "::set-output name=time::$time"

6
selenium/Dockerfile Normal file
View File

@@ -0,0 +1,6 @@
FROM selenium/standalone-firefox
RUN sudo apt update && \
sudo apt install -y python3-pip python3-venv && \
sudo apt-get clean && sudo rm -rf /var/cache/apt/archives /var/lib/apt/lists

View File

@@ -1,9 +1,5 @@
FROM debian:sid-slim
MAINTAINER Alejandro Santillana alejandros714@protonmail.com
# For building and deploying to the VPS's and neocities
RUN apt-get update && \
apt-get install -y pandoc hugo curl --no-install-recommends && \
rm -rf var/lib/{apt,dpkg,cache,log}/
FROM gitea/runner-images:ubuntu-latest
RUN wget https://github.com/gohugoio/hugo/releases/download/v0.135.0/hugo_0.135.0_linux-amd64.deb && \
apt-get install -y ./hugo_0.135.0_linux-amd64.deb && \
rm -rf var/lib/{apt,dpkg,cache,log} hugo_0.135.0_linux-arm64.deb