diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml new file mode 100644 index 0000000..93891c5 --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,45 @@ +name: Update Fork +jobs: + update_local_fork: + name: Update Local Fork + runs-on: ubuntu-20.04 + steps: + - name: Clone Fork + run: git clone git@github.com:sudo-nautilus/FFmpeg-Builds-Win32.git FFmpeg32 + env: + GITHUB_TOKEN: ${{ github.token }} + - name: Add Remote From Original Repository + run: | + cd FFmpeg32 + git remote add upstream git://github.com/BtbN/FFmpeg-Builds + git fetch upstream + env: + GITHUB_TOKEN: ${{ github.token }} + - name: Update From Original Repo + run: git pull upstream master + env: + GITHUB_TOKEN: ${{ github.token }} + remove_some_files: + name: Remove Some Files + needs: update_local_fork + runs-on: ubuntu-20.04 + steps: + - name: Remove Workflow Files + run: rm -rf .github/workflows/ + - name: Remove The Empty Folder + run: | + rmdir .github/workflows + rmdir .github + - name: Remove LICENSE + run: rm LICENSE + - name: Remove Readme + run: rm README.md + update_fork: + name: Update The Fork + needs: remove_some_files + runs-on: ubuntu-20.04 + steps: + - name: Push Updated Repo + run: git push + env: + GITHUB_TOKEN: ${{ github.token }}