Skip to content

Update download links #1282

Update download links

Update download links #1282

Workflow file for this run

name: Update download links
on:
schedule:
- cron: '0 18 * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: iterative/setup-cml@v1
- name: Update
id: update
shell: bash
run: |
url=https://api.github.com/repos/iterative/dvc/releases/latest
version=$(curl --silent $url | jq -r .tag_name)
path=src/components/DownloadButton/index.tsx
sed -i "s/^const VERSION = .*$/const VERSION = \`$version\`/g" $path
echo "changes=$(git diff | tr '\n' ' ')" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
- name: Create PR
if: ${{ steps.update.outputs.changes != '' }}
run: |
cml pr create \
--token="${{ secrets.GITHUB_TOKEN }}" \
--message="dvc ${{ steps.update.outputs.version }}" \
--title="dvc ${{ steps.update.outputs.version }}" . \
--body="Ping @iterative/dvc"