Skip to content

Commit

Permalink
Upload .deb logs on failure systemctl status failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Oct 14, 2024
1 parent 9ad5884 commit f9af0d7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1379,8 +1379,28 @@ jobs:
cat /usr/bin/tgs-configure
- name: Test Service
id: test-service
run: |
set +e
systemctl status tgstation-server
retval=$?
set -e
if [[ $retval -ne 0 ]]; then
echo "succeeded=NO" >> $GITHUB_OUTPUT
else
echo "succeeded=YES" >> $GITHUB_OUTPUT
fi
- name: Chown Errored Service Logs
if: failure() && ${{ steps.test-service.outputs.succeeded == 'NO' }}
run: sudo chown -R runner /var/log/tgstation-server

- name: Store Errored Service Logs
if: failure() && ${{ steps.test-service.outputs.succeeded == 'NO' }}
uses: actions/upload-artifact@v4
with:
name: systemd-service-logs
path: /var/log/tgstation-server/**/*

- name: Test Uninstall # Wait 10s for service to initialize
shell: bash
Expand Down

0 comments on commit f9af0d7

Please sign in to comment.