Skip to content

Commit

Permalink
👷 CI Change
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki committed Feb 22, 2024
1 parent 0e98d76 commit 586d176
Showing 1 changed file with 59 additions and 59 deletions.
118 changes: 59 additions & 59 deletions .github/workflows/youtube.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
name: Update M3U

on:
workflow_dispatch:
schedule:
- cron: "0 23 * * *"


jobs:
Update:
name: 📺 m3u update
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write

steps:
- name: 📥 Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🕓 GetTime
id: date
run: |
echo "DATE=$(date +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_OUTPUT
# name: Update M3U

# on:
# workflow_dispatch:
# schedule:
# - cron: "0 23 * * *"


# jobs:
# Update:
# name: 📺 m3u update
# runs-on: ubuntu-latest
# permissions:
# id-token: write
# contents: write

# steps:
# - name: 📥 Checkout the repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0

# - name: 🕓 GetTime
# id: date
# run: |
# echo "DATE=$(date +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_OUTPUT


- name: 🔮 Get a random quote
id: quote
run: |
sudo apt-get -y install fortune-mod
TITLE=$(fortune -s | tr -d '[:punct:]' | tr -d '[:digit:]' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | head -n 1)
# Limit the TITLE to 256 characters
TITLE=${TITLE:0:256}
echo "TITLE=$TITLE" >> $GITHUB_OUTPUT
- name: youtube-dl
run: |
curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
chmod a+rx /usr/local/bin/youtube-dl
echo "#EXTM3U" > yt-list.m3u
echo "" >> yt-list.m3u
youtube-dl -U --no-warnings --skip-download -i --playlist-end 5 --playlist-random --sleep-interval 30
- name: 🪪 Identify
run: |
git config --global user.email "[email protected]"
git config --global user.name "${GITHUB_ACTOR}"
- name: Clean
run: |
git checkout --orphan latest_branch
git add -A
git commit -am "${{ steps.date.outputs.DATE }} - ${{ steps.quote.outputs.TITLE }}"
git branch -D main
git branch -m main
git push -f origin main
# - name: 🔮 Get a random quote
# id: quote
# run: |
# sudo apt-get -y install fortune-mod
# TITLE=$(fortune -s | tr -d '[:punct:]' | tr -d '[:digit:]' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | head -n 1)

# # Limit the TITLE to 256 characters
# TITLE=${TITLE:0:256}
# echo "TITLE=$TITLE" >> $GITHUB_OUTPUT

# - name: youtube-dl
# run: |
# curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
# chmod a+rx /usr/local/bin/youtube-dl
# echo "#EXTM3U" > yt-list.m3u
# echo "" >> yt-list.m3u
# youtube-dl -U --no-warnings --skip-download -i --playlist-end 5 --playlist-random --sleep-interval 30


# - name: 🪪 Identify
# run: |
# git config --global user.email "[email protected]"
# git config --global user.name "${GITHUB_ACTOR}"


# - name: Clean
# run: |
# git checkout --orphan latest_branch
# git add -A
# git commit -am "${{ steps.date.outputs.DATE }} - ${{ steps.quote.outputs.TITLE }}"
# git branch -D main
# git branch -m main
# git push -f origin main

0 comments on commit 586d176

Please sign in to comment.