Skip to content

Commit

Permalink
first attempt at CI
Browse files Browse the repository at this point in the history
  • Loading branch information
EricDriussi committed Mar 24, 2024
1 parent 6e175a0 commit 764006c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
push:
branches:
- ci
schedule:
- cron: '0 0 * * 3' # Every Wednesday at 00:00 UTC

jobs:
build:
runs-on: debian:latest
steps:
- name: Checkout code
uses: actions/[email protected]

- name: Update and install curl
run: |
apt-get update
apt-get install -y curl
- name: Entrypoint for setup
run: |
curl -sSL curl -sSL https://raw.githubusercontent.com/EricDriussi/host-your-own/ci/init.sh | bash
17 changes: 17 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -o nounset
set -o errexit
set -o pipefail

rm -rf ./host-your-own && git clone [email protected]:ericdriussi/host-your-own.git ./host-your-own

if [ "$EUID" -eq 0 ]; then # is root user
apt install -y pipx
else
sudo apt install -y pipx
fi

pipx install --include-deps ansible

cd ./host-your-own
~/.local/bin/ansible-playbook run.yml

0 comments on commit 764006c

Please sign in to comment.