Update Barcodes #2
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 Barcodes | |
on: | |
schedule: | |
- cron: '0 0 */7 * *' | |
jobs: | |
update_barcodes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: 'Get updated barcodes and lineages from Freyja repo' | |
run: | | |
git clone http://github.com/andersen-lab/Freyja | |
cp Freyja/freyja/data/usher_barcodes.feather data/barcodes | |
cp Freyja/freyja/data/last_barcode_update.txt data/barcodes | |
cp Freyja/freyja/data/lineages.yml data/ | |
- name: 'Commit and push changes' | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
git remote set-url origin https://github.com/andersen-lab/Freyja-nf | |
if [[($(git status data/barcodes/usher_barcodes.feather --porcelain | wc -c) -ne 0)]]; then | |
git add data/barcodes/usher_barcodes.feather | |
git add data/barcodes/last_barcode_update.txt | |
git add data/lineages.yml | |
fi | |
git commit -m "Update barcodes" | |
git push |