Skip to content

Commit

Permalink
Update deploy_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargi Ketan Chauhan authored and GitHub Enterprise committed Mar 4, 2025
1 parent d271c20 commit 7532e9d
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ on:
jobs:
build-and-deploy:
runs-on: self-hosted
container:
image: docker:20.10.7
options: --privileged
volumes:
- /var/run/docker.sock:/var/run/docker.sock

env:
REPO_NAME: ${{ github.repository }}
COMPOSE_FILE: ${{ github.event.inputs.config || 'docker-compose.dev.yml' }}
Expand All @@ -34,21 +40,21 @@ jobs:
keys-case: bypass

- name: Set Docker socket permissions
run: sudo -E sh -c "chmod 666 /var/run/docker.sock"
run: sudo -E chmod 666 /var/run/docker.sock

- name: Check status of config file
run: sudo -E sh -c "
env
docker compose version
run: |
sudo -E env
sudo -E docker compose version
cd $GITHUB_WORKSPACE
docker compose -f $COMPOSE_FILE --verbose config && printf 'OK\n' || exit 1
"
sudo -E docker compose -f $COMPOSE_FILE --verbose config && printf 'OK\n' || exit 1
- name: Build and run docker image
run: sudo -E sh -c "docker compose -f $COMPOSE_FILE up --force-recreate --build -d"
run: sudo -E docker compose -f $COMPOSE_FILE up --force-recreate --build -d

- name: Verify that gateway is available
run: sudo -E sh -c "docker ps"
run: sudo -E docker ps




Expand Down

0 comments on commit 7532e9d

Please sign in to comment.