Update zip on OSF #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update zip on OSF | |
on: | |
workflow_dispatch: | |
#push: | |
env: | |
ZIP_NAME: "LEPHARE-data.zip" | |
OSF_PROJ_ID: "mvpks" | |
OSF_USER: "[email protected]" | |
OSF_PASSWORD: ${{ secrets.OSF_PASS }} | |
jobs: | |
zip-and-upload: | |
name: Zip repo and upload to OSF | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 # Check out the repository | |
- name: Import packages | |
run: | | |
pip install osfclient | |
- name: Zip repo | |
run: | | |
zip -r -v $ZIP_NAME . | |
- name: Make .osfcli.config file | |
run: | | |
echo "[osf]" > .osfcli.config | |
echo "username = $OSF_USER" >> .osfcli.config | |
echo "project = $OSF_PROJ_ID" >> .osfcli.config | |
echo "password = $OSF_PASSWORD" >> .osfcli.config | |
- name: Check .osfcli.config file | |
run: | | |
cat .osfcli.config | |
- name: Update on OSF | |
run: | | |
osf upload --update $ZIP_NAME $ZIP_NAME |