Sync with Jellyfin Web Repository #148
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync with Jellyfin Web Repository | |
on: | |
schedule: | |
- cron: '0 2 * * *' | |
workflow_dispatch: # Allows manual triggering of the workflow | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout jellyfin-web-requests repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for all branches and tags | |
token: ${{ secrets.WORKFLOW }} | |
- name: Configure git | |
run: | | |
git config user.name "GitHub Action" | |
git config user.email "[email protected]" | |
- name: Add upstream remote | |
run: git remote add upstream https://github.com/jellyfin/jellyfin-web.git | |
- name: Fetch changes from upstream | |
run: git fetch upstream | |
- name: Merge upstream changes to master | |
run: | | |
git checkout master | |
git merge upstream/master | |
git push origin master | |
env: | |
GITHUB_TOKEN: ${{ secrets.WORKFLOW }} | |
- name: Discord notification | |
if: failure() | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
uses: Ilshidur/action-discord@master | |
with: | |
args: 'The workflow "Sync with Jellyfin Web Repository" has failed!' |