This commit is contained in:
parent
1c7e793fb2
commit
d2cc4b1a01
27
.github/workflows/ci.yaml
vendored
27
.github/workflows/ci.yaml
vendored
@ -43,7 +43,14 @@ jobs:
|
|||||||
name: Version
|
name: Version
|
||||||
run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ${GITHUB_OUTPUT}
|
run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ${GITHUB_OUTPUT}
|
||||||
|
|
||||||
- name: Build Container
|
- name: Build unstable Container
|
||||||
|
if: github.ref_name != 'main'
|
||||||
|
run: |
|
||||||
|
echo ${{secrets.PACKAGES_TOKEN}} | docker login --username ${{ secrets.PACKAGES_USER }} --password-stdin git.arindy.de
|
||||||
|
docker build -f src/main/docker/Dockerfile.native-micro -t git.arindy.de/arindy/dice-tower:unstable -t git.arindy.de/arindy/dice-tower:${{ steps.version.outputs.VERSION }} .
|
||||||
|
docker push git.arindy.de/arindy/dice-tower:unstable
|
||||||
|
|
||||||
|
- name: Build stable Container
|
||||||
if: github.ref_name == 'main'
|
if: github.ref_name == 'main'
|
||||||
run: |
|
run: |
|
||||||
echo ${{secrets.PACKAGES_TOKEN}} | docker login --username ${{ secrets.PACKAGES_USER }} --password-stdin git.arindy.de
|
echo ${{secrets.PACKAGES_TOKEN}} | docker login --username ${{ secrets.PACKAGES_USER }} --password-stdin git.arindy.de
|
||||||
@ -51,10 +58,28 @@ jobs:
|
|||||||
docker push git.arindy.de/arindy/dice-tower:${{ steps.version.outputs.VERSION }}
|
docker push git.arindy.de/arindy/dice-tower:${{ steps.version.outputs.VERSION }}
|
||||||
docker push git.arindy.de/arindy/dice-tower:latest
|
docker push git.arindy.de/arindy/dice-tower:latest
|
||||||
|
|
||||||
|
- name: Prepare deploy
|
||||||
|
run: |
|
||||||
|
echo ${{secrets.SSH_KNOWN_HOSTS}} >> ~/.ssh/known_hosts
|
||||||
|
base64 -d <<< ${{secrets.SSH_KEY}} > ./.key
|
||||||
|
chmod 600 ./.key
|
||||||
|
|
||||||
|
- name: Deploy unstable
|
||||||
|
if: github.ref_name != 'main'
|
||||||
|
run: "ssh -i ./.key dice-tower@${{secrets.SSH_HOST}} 'docker compose -f compose.unstable.yml up -d' "
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
|
if: github.ref_name == 'main'
|
||||||
|
run: "ssh -i ./.key dice-tower@${{secrets.SSH_HOST}} 'docker compose -f compose.yml up -d' "
|
||||||
|
|
||||||
|
- name: Deploy local
|
||||||
if: github.ref_name == 'main'
|
if: github.ref_name == 'main'
|
||||||
run: "docker compose up -d"
|
run: "docker compose up -d"
|
||||||
|
|
||||||
|
- name: clean up
|
||||||
|
run: |
|
||||||
|
rm ./.key
|
||||||
|
|
||||||
- name: create tag
|
- name: create tag
|
||||||
if: github.ref_name == 'main'
|
if: github.ref_name == 'main'
|
||||||
run: |
|
run: |
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -124,3 +124,5 @@ fabric.properties
|
|||||||
# Android studio 3.1+ serialized cache file
|
# Android studio 3.1+ serialized cache file
|
||||||
.idea/caches/build_file_checksums.ser
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
||||||
|
.key
|
||||||
|
.key/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user