From 469f6c6b2655f881bc0ce3303721206809f87d8c Mon Sep 17 00:00:00 2001 From: Tim Stavenger Date: Thu, 24 Oct 2024 07:53:26 -0700 Subject: [PATCH] add custom composite action to retry setup-ffmpeg if fetch fails --- .github/actions/setup-ffmpeg/action.yml | 19 +++++++++++++++++++ .github/workflows/jupyter-matrix.yml | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .github/actions/setup-ffmpeg/action.yml diff --git a/.github/actions/setup-ffmpeg/action.yml b/.github/actions/setup-ffmpeg/action.yml new file mode 100644 index 0000000..ca17608 --- /dev/null +++ b/.github/actions/setup-ffmpeg/action.yml @@ -0,0 +1,19 @@ +name: 'Setup ffmpeg' +description: 'Setting up ffmpeg with additional retries in case a fetch fails.' +runs: + using: 'composite' + steps: + - name: Setup ffmpeg (attempt 1) + id: attempt1 + continue-on-error: true + uses: FedericoCarboni/setup-ffmpeg@v3.1 + - name: Setup ffmpeg (attempt 2) + if: ${{ steps.attempt1.outcome == 'failure' }} + id: attempt2 + continue-on-error: true + uses: FedericoCarboni/setup-ffmpeg@v3.1 + - name: Setup ffmpeg (attempt 3) + if: ${{ steps.attempt2.outcome == 'failure' }} + id: attempt3 + continue-on-error: true + uses: FedericoCarboni/setup-ffmpeg@v3.1 \ No newline at end of file diff --git a/.github/workflows/jupyter-matrix.yml b/.github/workflows/jupyter-matrix.yml index ec2846d..ff46e14 100644 --- a/.github/workflows/jupyter-matrix.yml +++ b/.github/workflows/jupyter-matrix.yml @@ -24,8 +24,8 @@ jobs: with: python-version: "3.12" - - name: Setup FFmpeg - uses: FedericoCarboni/setup-ffmpeg@v3 + - name: Setup ffmpeg (with retries) + uses: ./.github/actions/setup-ffmpeg - name: Setup TeX Live uses: teatimeguest/setup-texlive-action@v3