Skip to content

Installer Dev

Installer Dev #849

name: Installer Dev
on:
workflow_run:
workflows: ["Multi Environment Build"]
types:
- completed
jobs:
check_feature:
name: Check if feature
runs-on: ubuntu-latest
outputs:
is_feature: ${{ steps.check.outputs.is_feature }}
steps:
- id: check
run: |
echo "Doing ${{ github.event.workflow_run.event }} on ${{ github.event.workflow_run.head_branch }}"
if ${{ github.event.workflow_run.event == 'push' && startsWith(github.event.workflow_run.head_branch, 'feature/') }}; then
echo "It's a feature"
echo "is_feature=true" >> $GITHUB_OUTPUT
else
echo "It's not a feature"
echo "is_feature=false" >> $GITHUB_OUTPUT
fi
deploy:
name: Deploy to dev
needs: check_feature
if: needs.check_feature.outputs.is_feature == 'true'
runs-on: dev
steps:
- name: Run
working-directory: /home/utmstack
run: |
sudo ./installer
- name: Open ports
id: open_ports
working-directory: /home/utmstack
run: |
sudo docker service update --publish-add 9200:9200 utmstack_node1 & docker service update --publish-add 5432:5432 utmstack_postgres