Skip to content

Commit

Permalink
add a delay time to wait for rcon-cli to start
Browse files Browse the repository at this point in the history
  • Loading branch information
win5923 committed Feb 10, 2024
1 parent def5ccb commit a9ed9cc
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and export to Docker
uses: docker/build-push-action@v5
with:
Expand Down Expand Up @@ -129,14 +123,14 @@ jobs:
- name: Test if server is up and running
run: |
sleep 5
if ! docker exec palworld-server rcon-cli Info | grep -q "Welcome to Pal Server"; then
echo "Server may not have started successfully."
exit 1
fi
- name: Test if port 8211, 27015 and 25575 are listening
run: |
sleep 10
nc -z -u -v 127.0.0.1 8211 || exit 1
nc -z -u -v 127.0.0.1 27015 || exit 1
nc -z -v 127.0.0.1 25575 || exit 1
Expand All @@ -162,12 +156,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and export to Docker
uses: docker/build-push-action@v5
with:
Expand Down Expand Up @@ -204,7 +192,7 @@ jobs:
- name: Wait for server to start
run: |
TIMEOUT_SECONDS=240
TIMEOUT_SECONDS=360
START_TIME=$(date +%s)
while ! docker logs palworld-server 2>&1 | grep -q "Setting breakpad minidump AppID"; do
Expand All @@ -222,14 +210,14 @@ jobs:
- name: Test if server is up and running
run: |
sleep 5
if ! docker exec palworld-server rcon-cli Info | grep -q "Welcome to Pal Server"; then
echo "Server may not have started successfully."
exit 1
fi
- name: Test if port 8211, 27015 and 25575 are listening
run: |
sleep 10
nc -z -u -v 127.0.0.1 8211 || exit 1
nc -z -u -v 127.0.0.1 27015 || exit 1
nc -z -v 127.0.0.1 25575 || exit 1
Expand Down

0 comments on commit a9ed9cc

Please sign in to comment.