Skip to content

Commit

Permalink
Disable screen recording by default
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasweishaupt committed Oct 21, 2024
1 parent c554856 commit e503037
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/actions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
enable_screen_recording:
description: 'Enable screen recording'
required: false
default: false
type: boolean


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand Down Expand Up @@ -322,6 +328,7 @@ jobs:
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Start screen and recording
if: github.event_name == 'workflow_dispatch' && github.event.inputs.enable_screen_recording == 'true'
run: |
ffmpeg -f x11grab -video_size 1920x1080 -i :99 -codec:v libx264 -r 30 -v verbose screen_recording.mp4 &
echo $! > ffmpeg_pid.txt
Expand Down Expand Up @@ -407,26 +414,18 @@ jobs:
kill $AUTHORING_TOOL_PID
- name: Stop screen recording
if: always()
if: github.event_name == 'workflow_dispatch' && github.event.inputs.enable_screen_recording == 'true'
run: |
sleep 1
kill $(cat ffmpeg_pid.txt)
sleep 5 # Give ffmpeg time to finish writing
- name: Upload screen recording
if: always()
if: github.event_name == 'workflow_dispatch' && github.event.inputs.enable_screen_recording == 'true'
uses: actions/upload-artifact@v4
with:
name: screen-recording
path: screen_recording.mp4

- name: Check for errors
if: always()
run: |
if [ -f ./error.log ]; then
cat ./error.log
exit 1
fi

- name: Check Docker containers
run: $script_check_docker
Expand Down Expand Up @@ -488,6 +487,7 @@ jobs:
echo "Kurse erhalten: $COURSES_RESPONSE"
- name: Start screen and recording
if: github.event_name == 'workflow_dispatch' && github.event.inputs.enable_screen_recording == 'true'
run: |
ffmpeg -f x11grab -video_size 1920x1080 -i :99 -codec:v libx264 -r 30 -v verbose moodle_check.mp4 &
echo $! > ffmpeg_pid.txt
Expand All @@ -511,22 +511,23 @@ jobs:
echo "PASSWORD: $PASSWORD"
$script_enrol_student_sh $MOODLE_URL $COURSENAME $USERNAME $PASSWORD
- name: Stop screen recording
if: always()
if: github.event_name == 'workflow_dispatch' && github.event.inputs.enable_screen_recording == 'true'
run: |
sleep 1
kill $(cat ffmpeg_pid.txt)
sleep 5 # Give ffmpeg time to finish writing
- name: Upload screen recording
if: always()
if: github.event_name == 'workflow_dispatch' && github.event.inputs.enable_screen_recording == 'true'
uses: actions/upload-artifact@v4
with:
name: moodle_check
path: moodle_check.mp4

- name: Start screen and recording
if: github.event_name == 'workflow_dispatch' && github.event.inputs.enable_screen_recording == 'true'
run: |
ffmpeg -f x11grab -video_size 1920x1080 -i :99 -codec:v libx264 -r 30 -v verbose check_3d.mp4 &
echo $! > ffmpeg_pid.txt
Expand All @@ -543,14 +544,14 @@ jobs:
$script_test_3d_sh $URL_3D $USERNAME $PASSWORD $COURSENAME $SPACENAME $ELEMENTNAME
- name: Stop screen recording
if: always()
if: github.event_name == 'workflow_dispatch' && github.event.inputs.enable_screen_recording == 'true'
run: |
sleep 1
kill $(cat ffmpeg_pid.txt)
sleep 5 # Give ffmpeg time to finish writing
- name: Upload screen recording
if: always()
if: github.event_name == 'workflow_dispatch' && github.event.inputs.enable_screen_recording == 'true'
uses: actions/upload-artifact@v4
with:
name: check_3d
Expand Down

0 comments on commit e503037

Please sign in to comment.