Initial release
All checks were successful
Build VMCli with PowerShell / Build-VMCli (push) Successful in 5m25s
All checks were successful
Build VMCli with PowerShell / Build-VMCli (push) Successful in 5m25s
Signed-off-by: Leonardo Amaral <contato@leonardoamaral.com.br>
This commit is contained in:
commit
af90aa2407
59
.gitea/workflows/build-and-push.yaml
Normal file
59
.gitea/workflows/build-and-push.yaml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
name: Build VMCli with PowerShell
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Build-VMCli:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
ContainerNetworkMode: webservices
|
||||||
|
steps:
|
||||||
|
- name: Install docker
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt -y install curl ca-certificates
|
||||||
|
install -m 0755 -d /etc/apt/keyrings
|
||||||
|
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
||||||
|
chmod a+r /etc/apt/keyrings/docker.asc
|
||||||
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
|
||||||
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||||
|
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
apt update
|
||||||
|
apt -y install docker-ce-cli docker-buildx-plugin docker-compose-plugin
|
||||||
|
|
||||||
|
- name: Clone Repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Cache Docker layers
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ runner.arch }}-buildx-vmcli
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
# Someday.... https://github.com/go-gitea/gitea/issues/23642
|
||||||
|
# username: ${{ gitea.repository_owner }}
|
||||||
|
# password: ${{ secrets.GITEA_TOKEN}}
|
||||||
|
username: ${{ vars.PAT_USER }}
|
||||||
|
password: ${{ secrets.PAT_TOKEN}}
|
||||||
|
registry: git.leonardoamaral.com.br
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
run: |
|
||||||
|
docker buildx build --cache-from type=local,src=/tmp/.buildx-cache --cache-to type=local,dest=/tmp/.buildx-cache-new,mode=max --load --tag git.leonardoamaral.com.br/leonardo/woof:latest --file Containerfile .
|
||||||
|
docker push git.leonardoamaral.com.br/leonardo/woof:latest
|
||||||
|
|
||||||
|
- name: Move cache
|
||||||
|
run: |
|
||||||
|
rm -rf /tmp/.buildx-cache
|
||||||
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||||
|
|
16
Containerfile
Normal file
16
Containerfile
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
FROM docker.io/library/python:3-slim as catatonit
|
||||||
|
|
||||||
|
RUN apt update \
|
||||||
|
&& apt -y install catatonit
|
||||||
|
|
||||||
|
FROM docker.io/library/python:3-slim
|
||||||
|
|
||||||
|
COPY --from=catatonit /usr/libexec/podman/catatonit /catatonit
|
||||||
|
ADD https://raw.githubusercontent.com/simon-budig/woof/woof-20220202/woof /usr/bin/woof
|
||||||
|
RUN mkdir /data
|
||||||
|
|
||||||
|
WORKDIR /data
|
||||||
|
EXPOSE 8008
|
||||||
|
|
||||||
|
ENTRYPOINT ["/catatonit", "--"]
|
||||||
|
CMD ["/usr/bin/woof", "-i", "0.0.0.0", "-p", "8008", "-c", "1", "-U"]
|
Loading…
Reference in New Issue
Block a user