17 Commits

Author SHA1 Message Date
Gregor Lohaus
c4dc527110 Merge branch 'workflow'
All checks were successful
Deploy / Explore-Gitea-Actions (push) Successful in 4m19s
2026-03-09 19:18:54 +01:00
Gregor Lohaus
268d234f98 deploy job 2026-03-09 19:18:38 +01:00
Gregor Lohaus
98b09c58a4 use bash in deploy step
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5m1s
2026-03-09 18:52:39 +01:00
Gregor Lohaus
85eed9527e use bash in deploy step
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2m58s
2026-03-09 18:45:43 +01:00
Gregor Lohaus
9332d54cf2 test deployment
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 3m4s
2026-03-09 18:39:05 +01:00
Gregor Lohaus
edb8300ef7 java home
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6m36s
2026-03-09 17:25:56 +01:00
Gregor Lohaus
8e5e84565c use pc as act runner
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3m58s
2026-03-09 17:17:37 +01:00
Gregor Lohaus
5af2edca59 java home
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 20m37s
2026-03-09 15:28:08 +01:00
Gregor Lohaus
5074cb62e3 binary path
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
2026-03-09 15:26:20 +01:00
Gregor Lohaus
f114b3a776 no cd
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
2026-03-09 15:24:00 +01:00
Gregor Lohaus
dd31c35e70 new runner
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 46s
2026-03-09 14:58:57 +01:00
Gregor Lohaus
7d28a11d81 test build
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 0s
2026-03-09 14:28:50 +01:00
Gregor Lohaus
9de644097a test build
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 7s
2026-03-09 14:23:10 +01:00
Gregor Lohaus
cb7360585d reg credentials
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s
2026-03-09 14:08:32 +01:00
Gregor Lohaus
f691c83315 reg credentials
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
2026-03-09 14:05:59 +01:00
Gregor Lohaus
e270438331 custom image
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
2026-03-09 14:00:34 +01:00
Gregor Lohaus
f824386fd1 test demo workflow
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 39s
2026-03-09 11:25:14 +01:00
2 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
name: Deploy
run-name: ${{ gitea.actor }} deployed latest version 🚀
on:
push:
branches:
- "main"
jobs:
Explore-Gitea-Actions:
runs-on: x86
container:
image: gitea.gregorlohaus.com/gregor/graal:latest
credentials:
username: lohausgregor@gmail.com
password: ${{ secrets.REGPASS }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run: /usr/local/bin/docker-entrypoint.sh postgres &
- name: build
working-directory: ${{ gitea.workspace }}/Backend
env:
JAVA_HOME: /root/.sdkman/candidates/java/current
run: /root/.sdkman/candidates/gradle/9.4.0/bin/gradle build
- name: deploy
shell: bash
run: |
eval "$(ssh-agent -s)"
ssh-add <(echo "${{ secrets.DEPLOYSSHKEY }}")
mkdir -p ~/.ssh
ssh-keyscan 162.55.217.172 >> ~/.ssh/known_hosts
scp ${{ gitea.workspace }}/Backend/build/native/nativeCompile/gtransfer anon@162.55.217.172:/home/anon/.local/bin/gtransfernew
ssh anon@162.55.217.172 "chmod +x /home/anon/.local/bin/gtransfernew"
ssh anon@162.55.217.172 "mv /home/anon/.local/bin/gtransfer /home/anon/.local/bin/gtransferback"
ssh anon@162.55.217.172 "mv /home/anon/.local/bin/gtransfernew /home/anon/.local/bin/gtransfer"
ssh anon@162.55.217.172 "sudo systemctl restart gtransfer"
# - name: upload binary
# uses: https://gitea.com/actions/gitea-upload-artifact@v4
# with:
# name: gtransfer
# path: ${{ gitea.workspace }}/Backend/build/native/nativeCompile/gtransfer

12
Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM postgres:15.17-trixie
RUN apt update
RUN apt install -y curl wget zip unzip build-essential zlib1g-dev nodejs ssh
RUN curl -s "https://get.sdkman.io?ci=true" | bash
SHELL ["/bin/bash", "-c"]
RUN source "/root/.sdkman/bin/sdkman-init.sh" \
&& sdk install java 25.0.2-graalce \
&& sdk install gradle
ENV POSTGRES_PASSWORD=gtransfer
ENV POSTGRES_USER=gtransfer
ENV POSTGRES_DB=gtransfer
ENTRYPOINT ["/bin/bash"]