Compare commits
17 Commits
5476011192
...
c4dc527110
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4dc527110 | ||
|
|
268d234f98 | ||
|
|
98b09c58a4 | ||
|
|
85eed9527e | ||
|
|
9332d54cf2 | ||
|
|
edb8300ef7 | ||
|
|
8e5e84565c | ||
|
|
5af2edca59 | ||
|
|
5074cb62e3 | ||
|
|
f114b3a776 | ||
|
|
dd31c35e70 | ||
|
|
7d28a11d81 | ||
|
|
9de644097a | ||
|
|
cb7360585d | ||
|
|
f691c83315 | ||
|
|
e270438331 | ||
|
|
f824386fd1 |
41
.gitea/workflows/deploy.yaml
Normal file
41
.gitea/workflows/deploy.yaml
Normal 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
12
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user