Download a file from url and then upload it to your repo
Create a .github/workflows/download-upload.yml
file in the repository you want to install this action, then add the following to it:
name: Update File
on:
push:
branches:
- master
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wow-actions/download-upload@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
url: the-file-url-to-download
dir: the-dir-to-save-the-file
filename: the-file-name-to-save-default-parsed-from-url
Various inputs are defined to let you configure the action:
Note: Workflow command and parameter names are not case-sensitive.
Name | Description | Default |
---|---|---|
GITHUB_TOKEN |
The GitHub token for authentication | N/A |
url |
The file url to download | N/A |
dir |
The dir path to save the file | N/A |
filename |
The file name to save | Parsed from url |
commit_message |
Commit message when update the file | 'chore: update file [skip ci]' |
Name | Description |
---|---|
filepath |
The file path saved in your repo |
The scripts and documentation in this project are released under the MIT License