Compare commits

...

12 Commits

Author SHA1 Message Date
Bel LaPointe
f8286fd627 pull or ok
All checks were successful
cicd / pull (push) Successful in 5s
cicd / cicd (push) Successful in 33s
2025-05-25 12:27:44 -06:00
Bel LaPointe
1d9627f24c rename
Some checks failed
cicd / pull (push) Failing after 6s
cicd / cicd (push) Successful in 16s
2025-05-25 12:22:11 -06:00
Bel LaPointe
01ca1e6919 build weekly
All checks were successful
cicd / pull (push) Successful in 11s
cicd / cicd (push) Successful in 1m31s
2025-05-25 12:21:04 -06:00
bel
cbe863eede jq pls
All checks were successful
cicd / pull (push) Successful in 9s
cicd / cicd (push) Successful in 28s
2023-10-28 09:39:04 -06:00
bel
eff7fd01ca complete i think
All checks were successful
cicd / pull (push) Successful in 4s
cicd / cicd (push) Successful in 10s
2023-10-28 09:24:37 -06:00
bel
52d41e9b68 pull
Some checks failed
cicd / pull (push) Successful in 8s
cicd / cicd (push) Failing after 31s
2023-10-28 09:23:41 -06:00
bel
a89ebbf558 give up
Some checks failed
cicd / cicd (push) Failing after 7s
2023-10-28 09:22:11 -06:00
bel
80d07b2cba no cmd
Some checks failed
cicd / pull (push) Successful in 5s
cicd / cicd (push) Failing after 3s
2023-10-28 09:20:58 -06:00
bel
3d2f3a92a5 build.sh does its own prune
Some checks failed
cicd / pull (push) Successful in 4s
cicd / cicd (push) Failing after 3s
2023-10-28 09:20:12 -06:00
bel
bca4f22eef different debug
Some checks failed
cicd / pull (push) Successful in 6s
cicd / cicd (push) Failing after 5s
2023-10-28 09:14:41 -06:00
bel
fe6748a0ae dont get fancy just run bash and git clone
Some checks failed
cicd / cicd (push) Failing after 5s
cicd / pull (push) Successful in 5s
2023-10-28 09:12:56 -06:00
bel
e48614f8b5 hijack shell to git clone 2023-10-28 09:02:48 -06:00
4 changed files with 36 additions and 22 deletions

View File

@@ -3,6 +3,8 @@ on:
push:
branches:
- main
schedule:
- cron: '2 2 * * 0'
jobs:
pull:
@@ -11,32 +13,21 @@ jobs:
steps:
- name: pull
run: |
was=$(docker images | grep registry-app.inhome.blapointe.com:5001/docker:latest | awk '{print $3}')
docker pull registry-app.inhome.blapointe.com:5001/docker:latest
new=$(docker images | grep registry-app.inhome.blapointe.com:5001/docker:latest | awk '{print $3}')
if [ "$was" != "$new" ]; then
docker rmi "$was"
fi
docker pull registry-app.inhome.blapointe.com:5001/bel/dind:latest || true
shell: sh
cicd:
name: cicd
runs-on: dind
steps:
- name: checkout
uses: actions/checkout@v3
- name: cicd
run: |
was=$(docker images | grep registry-app.inhome.blapointe.com:5001/docker:latest | awk '{print $3}')
env
echo clone ${{ gitea.repository }}
git clone ${{ gitea.repository }}
cd ./*/
pwd
ls
find . -type d
ps aux www
which git
if ! sh ./build.sh; then
exit 1
fi
new=$(docker images | grep registry-app.inhome.blapointe.com:5001/docker:latest | awk '{print $3}')
if [ "$was" != "$new" ]; then
docker rmi "$was"
fi
shell: sh

View File

@@ -1,3 +1,3 @@
FROM docker:24.0.7-dind-alpine3.18
RUN apk update && apk --no-cache add bash curl git
RUN apk update && apk --no-cache add bash curl git nodejs npm jq

View File

@@ -1,6 +1,19 @@
#! /bin/sh
img=registry-app.inhome.blapointe.com:5001/bel/dind
t=latest
set -e
docker build -f ./Dockerfile -t registry-app.inhome.blapointe.com:5001/docker:latest .
docker push registry-app.inhome.blapointe.com:5001/docker:latest
get_sha() {
docker inspect $img:$t | grep '"Id"' | awk '{print $NF}' | sed 's/^"sha256://' | sed 's/",$//'
}
was=$(get_sha)
docker build -f ./Dockerfile -t $img:$t .
docker push $img:$t
now=$(get_sha)
if [ -n "$was" ] && [ "$was" != "$now" ]; then
echo pruning old $was
docker rmi "$was" || true
fi

10
entrypoint.sh Normal file
View File

@@ -0,0 +1,10 @@
#! /bin/sh
set -e
if [ -n "$GITHUB_SERVER_URL" ] && [ -n "$GITHUB_REPOSITORY" ]; then
git clone "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" ./git.d
cd ./git.d
fi
exec bash "$@"