Skip to content

Commit

Permalink
Create deployback.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
malenelu authored and GitHub Enterprise committed Mar 13, 2025
1 parent 40802fc commit 610ccec
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deployback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy test backend new

on:
workflow_dispatch:
inputs:
config:
description: "Which compose config file to deploy"
required: true
default: "docker-compose.dev.yml"
type: choice
options:
- "docker-compose.dev.yml"
- "docker-comtestBck.yml"

jobs:
deploy:
runs-on: self-hosted
env:
REPO_NAME: ${{ github.event.repository.name }}
COMPOSE_FILE: ${{ github.event.inputs.config }}

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Dotenv Action
uses: falti/dotenv-action@v1.1.4
with:
export-variables: true
keys-case: bypass

- name: Checking COMPOSE FILE
run: |
echo "${COMPOSE_FILE}"
- name: Check status of config file
run: |
env
docker compose version
cd $GITHUB_WORKSPACE
docker compose -f $COMPOSE_FILE --verbose config && printf "OK\n" || exit 1
- name: Build and run docker image
run: docker compose -f $COMPOSE_FILE up --force-recreate --build -d

- name: Verify that gateway is available
run: docker ps

0 comments on commit 610ccec

Please sign in to comment.