Skip to content

Update TSV File

Update TSV File #2001

Workflow file for this run

name: Update TSV File
on:
schedule:
- cron: "0 * * * *" # Runs every hour; adjust as needed
workflow_dispatch: # Allows manual triggering
jobs:
update-tsv:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Fetch TSV File
run: |
# Create a folder for the data (if needed)
mkdir -p data
# Fetch the TSV using curl with credentials from secrets
curl -u "${{secrets.LENOVO_URL_USERNAME}}:${{secrets.LENOVO_URL_PASSWORD}}" "https://luezen5ed3.execute-api.eu-west-1.amazonaws.com/datasets-https/lenovo/301257/lenovo_kr_mandatory_test.tsv" -o data/lenovo_kr_mandatory_test.tsv
- name: Commit and Push Changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add data/lenovo_kr_mandatory_test.tsv
if ! git diff --cached --quiet; then
git commit -m "Update TSV file [skip ci]"
# Make sure this line is present and correct:
git remote set-url origin https://${{secrets.PAT_TOKEN}}@github.com/KAICJ/Decoder_FeedURL.git
git push origin HEAD:main
else
echo "No changes to commit."
fi