Skip to content

Create blank.yml

Create blank.yml #4

Workflow file for this run

name: Fetch EPG
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC
workflow_dispatch: # Manual trigger
jobs:
download-epg:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 1 # Fetch only the latest commit to allow squash
- name: Log EPG_URL variable
run: echo "Fetching EPG from URL: ${{ secrets.EPG_URL }}"

Check failure on line 19 in .github/workflows/fetch-epg.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/fetch-epg.yml

Invalid workflow file

You have an error in your yaml syntax on line 19
- name: Download the EPG file
run: |
curl -fSL "${{ secrets.EPG_URL }}" -o epg.xml
shell: bash
env:
EPG_URL: ${{ secrets.EPG_URL }}
- name: Log the downloaded file details
run: |
if [ -f "epg.xml" ]; then
echo "EPG file downloaded successfully."
ls -lh epg.xml
else
echo "Failed to download the EPG file."
fi
- name: Commit and push the EPG file (Squash Commit)
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 file"
git fetch origin
git rebase --interactive origin/main --autosquash
git push --force-with-lease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: success() # Only runs if previous steps succeed