primeiro commit
All checks were successful
Build and Push Image / Build and push image (push) Successful in 2m24s

This commit is contained in:
alphard 2024-04-29 04:25:54 -03:00
commit c7c4811f3a
3 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,31 @@
name: Build and Push Image
on: [ push ]
jobs:
build:
name: Build and push image
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: git.aehoo.net
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64
tags: |
git.aehoo.net/alphard/sui:${{env.GITHUB_SHA}}

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM cgr.dev/chainguard/wolfi-base
COPY run /usr/local/bin/run
RUN apk add --no-cache bash git wget ca-certificates libgcc tini
RUN wget -O /tmp/gw.tar.gz https://github.com/daniel7grant/gw/releases/download/v0.2.2/gw-bin_x86_64-unknown-linux-gnu.tar.gz &&\
wget -O /tmp/algernon.tar.xz https://github.com/xyproto/algernon/releases/download/v1.16.0/algernon-1.16.0-linux_x86_64_static.tar.xz &&\
tar -xvf /tmp/gw.tar.gz -C /usr/local/bin &&\
tar -xvf /tmp/algernon.tar.xz --strip=1 -C /usr/local/bin &&\
rm -f /tmp/gw.tar.gz /tmp/algernon.tar.xz /usr/local/bin/._LICENSE /usr/local/bin/LICENSE /usr/local/bin/algernon.1.gz &&\
chmod +x /usr/local/bin/run &&\
apk del -r wget
ENTRYPOINT ["tini"]
CMD ["/usr/local/bin/run"]

11
run Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
if [ -z "$GITREPO" ]; then
echo "variável GITREPO não encontrada"
exit 1
fi
mkdir -p /var/lib/gw
git clone "$GITREPO" /var/lib/gw/gitrepo
cd /var/lib/gw
exec gw gitrepo &
algernon --httponly --nocache -x -s /var/lib/gw/gitrepo