Initial commit with current files only
This commit is contained in:
29
.github/workflows/fetch-playlist.yml
vendored
Normal file
29
.github/workflows/fetch-playlist.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Update EPG
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Runs once a day at midnight
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
# Add a manual trigger
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-files:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository (no history)
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Download epg.xml
|
||||
run: curl -o epg.xml ${{ secrets.EPG_URL }}
|
||||
|
||||
- name: Force commit and push the changes (no history)
|
||||
run: |
|
||||
git config --global user.name "actions-user"
|
||||
git config --global user.email "actions@github.com"
|
||||
git add epg.xml
|
||||
git commit -m "Update EPG"
|
||||
git push --force # Force push to overwrite the previous commit
|
||||
44
.github/workflows/remove-history.yml
vendored
Normal file
44
.github/workflows/remove-history.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Clear Git History and Keep Current Files
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Manually trigger the workflow
|
||||
|
||||
jobs:
|
||||
reset-history:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout the current repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # Ensure that the entire history is fetched
|
||||
|
||||
- name: Configure Git author identity
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
|
||||
- name: Remove all Git history
|
||||
run: |
|
||||
# Create a new orphan branch
|
||||
git checkout --orphan temp-branch
|
||||
|
||||
# Add all files to the new branch
|
||||
git add -A
|
||||
|
||||
# Commit the files to the new branch
|
||||
git commit -m "Initial commit with current files only"
|
||||
|
||||
# Delete the old main branch
|
||||
git branch -D main
|
||||
|
||||
# Rename the new orphan branch to main
|
||||
git branch -m main
|
||||
|
||||
# Force push the new main branch to the remote repository
|
||||
git push -f origin main
|
||||
|
||||
- name: Clean up references
|
||||
run: |
|
||||
# Remove remote-tracking references to deleted branches (optional)
|
||||
git fetch origin --prune
|
||||
Reference in New Issue
Block a user