Skip to content

Commit

Permalink
Update testmain.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
camigr authored and GitHub Enterprise committed Mar 11, 2025
1 parent d3b0952 commit a4df5dd
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/testmain.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
name: setup nginx from the configuration file

on:
workflow_dispatch:

push:
branches: ["development"]
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-compose.stag.yml"
- "docker-compose.yml"

jobs:
deploy:
runs-on: self-hosted
Expand Down Expand Up @@ -31,5 +44,27 @@ jobs:
run: cp temp_default.conf nginx/nginx_securefit.conf
#run: cp nginx/nginx.conf /etc/nginx/conf.d/nginx_securefit.conf

# deploy_test steps
- name: Show nginx file
run: cat nginx/nginx_securefit.conf

- 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: 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 a4df5dd

Please sign in to comment.