Skip to content
This repository has been archived by the owner on Feb 24, 2025. It is now read-only.

Commit

Permalink
using artifacts to simplify workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
miloswrath committed Sep 27, 2024
1 parent db5a93c commit 2e0ee41
Showing 1 changed file with 46 additions and 14 deletions.
60 changes: 46 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,20 +140,52 @@ jobs:
echo "CSV file $csv_file does not exist"
fi
- name: Commit and Push QC Results
run: |
git config --global user.name "miloswrath"
git config --global user.email "[email protected]"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git add ./data/*/*/*.png
git commit -m "Add QC results for subjects $(date +%Y-%m-%d)"
git push origin main
- name: List Directory After QC
run: |
echo "Listing directory after running QC:"
find ./data -type d
find ./data -type f
- name: Upload QC Results
uses: actions/upload-artifact@v3
with:
name: qc-results-${{ matrix.config.sub }}-${{ matrix.config.task }}-${{ matrix.config.version }}
path: |
./data/${{ matrix.config.sub }}/processed/${{ matrix.config.run_part }}/*.png
./data/${{ matrix.config.sub }}/${{ matrix.config.run_part }}/*.log
commit_results:
name: Commit and Push QC Results
runs-on: self-hosted
needs: run_qc
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: ./
- name: Move QC Results
run: |
echo "Moving QC results to data directory..."
for dir in qc-results-*; do
echo "Processing artifact directory: $dir"
mkdir -p "./data"
mv "$dir"/* ./data/
done
- name: Commit and Push QC Results
run: |
git config --global user.name "miloswrath"
git config --global user.email "[email protected]"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git add ./data/*/*/*.png
git commit -m "Add QC results for subjects $(date +%Y-%m-%d)"
git push origin main
- name: List Directory After QC
run: |
echo "Listing directory after running QC:"
find ./data -type d
find ./data -type f
add:
name: Generate Jekyll Posts and Deploy
Expand Down

0 comments on commit 2e0ee41

Please sign in to comment.