New Deploy action
This commit is contained in:
13
.gitea/workflows/deploy.yml
Normal file
13
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
name: Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOCKER_COMPOSE: IMAGE_TAG=${{ gitea.ref_name }} docker compose --ansi=never -f=compose.yaml -f=compose.prod.yaml
|
||||||
|
steps:
|
||||||
@@ -10,7 +10,6 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
env:
|
env:
|
||||||
DOCKER_ORG: gitea
|
|
||||||
DOCKER_LATEST: nightly
|
DOCKER_LATEST: nightly
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -44,7 +43,6 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ./Containerfile
|
file: ./Containerfile
|
||||||
platforms: |
|
platforms: |
|
||||||
linux/amd64
|
|
||||||
linux/arm/v7
|
linux/arm/v7
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
env:
|
env:
|
||||||
DOCKER_ORG: marijn
|
|
||||||
DOCKER_LATEST: latest
|
DOCKER_LATEST: latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -46,9 +45,23 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ./Containerfile
|
file: ./Containerfile
|
||||||
platforms: |
|
platforms: |
|
||||||
linux/arm64
|
|
||||||
linux/arm/v7
|
linux/arm/v7
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
gitea.marijndoeve.nl/marijn/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
|
gitea.marijndoeve.nl/marijn/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
|
||||||
gitea.marijndoeve.nl/marijn/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
|
gitea.marijndoeve.nl/marijn/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
|
||||||
|
|
||||||
|
- name: Deploy Image to Sever
|
||||||
|
id: deploy
|
||||||
|
env:
|
||||||
|
DOCKER_COMPOSE: IMAGE_TAG=${{ gitea.ref_name }} docker compose --ansi=never -f=compose.yaml -f=compose.prod.yaml
|
||||||
|
uses: https://github.com/appleboy/ssh-action@master
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
key: ${{ secrets.KEY }}
|
||||||
|
port: ${{ secrets.PORT }}
|
||||||
|
script: |
|
||||||
|
cd /opt/projectorpi-web
|
||||||
|
${{ env.DOCKER_COMPOSE }} pull
|
||||||
|
${{ env.DOCKER_COMPOSE }} up -d
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: gitea.marijndoeve.nl/marijn/projectorpi-web:${IMAGE_TAG:-nightly}
|
image: gitea.marijndoeve.nl/marijn/projectorpi-web:${IMAGE_TAG:-latest}
|
||||||
|
|||||||
Reference in New Issue
Block a user