Skip to content

Commit

Permalink
ci: scripts to redeploy in developments
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadrien Froger committed Feb 7, 2024
1 parent 1399db3 commit 70a4396
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/redeploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Redeploy Decidim Image in Jelastic Infra

on:
workflow_dispatch:
inputs:
environment:
description: 'Environment'
required: true
type: environment
TAG:
description: 'Image Tag to redeploy'
required: true
default: 'latest' # You can set a default value or make it required without a default.

jobs:
redeploy:
runs-on: ubuntu-latest
container:
image: mwienk/jelastic-cli
steps:
- name: Redeploy container in Jelastic
env:
JELASTIC_LOGIN: ${{ secrets.JELASTIC_LOGIN }}
JELASTIC_PASSWORD: ${{ secrets.JELASTIC_PASSWORD }}
JELASTIC_HOSTER: ${{ secrets.JELASTIC_HOSTER }}
ENVNAME: ${{ secrets.ENVNAME }}
USE_EXISTING_VOLUME: ${{ secrets.USE_EXISTING_VOLUME }} # Default to true if not set
HOME: /root
run: |
/root/jelastic/users/authentication/signin --login $JELASTIC_LOGIN --password $JELASTIC_PASSWORD --platformUrl $JELASTIC_HOSTER
/root/jelastic/environment/control/redeploycontainersbygroup --envName $ENVNAME --nodeGroup cp --tag ${inputs.TAG} --useExistingVolumes ${USE_EXISTING_VOLUME:-true}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ public/uploads
vendor
.bash_history
node_modules
.npm
.npm
.bash_history

0 comments on commit 70a4396

Please sign in to comment.