dipu ce #110
This file contains hidden or 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: dipu ce | |
| on: | |
| workflow_dispatch: | |
| # push: | |
| # branches: | |
| # - "wgs/**" | |
| schedule: | |
| - cron: '30 11 * * 6' | |
| env: | |
| target_file: "/home/autolink/rsync/train_flag" | |
| source_file: "/artifacts/train_flag" | |
| concurrency: | |
| group: ${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| Archive_Results: | |
| name: archive train results | |
| runs-on: github-tps-ce | |
| outputs: | |
| results: ${{ steps.step1.outputs.results }} | |
| steps: | |
| - name: Check if collected | |
| id: step1 | |
| run: | | |
| diff_output=$(diff -q --ignore-all-space "$target_file" "$source_file" ) && export to_archive=false || export to_archive=true | |
| echo "to_archive=$to_archive" >> "$GITHUB_ENV" | |
| if [ $to_archive == "false" ]; then | |
| echo "The file content is the same,results have been collected" | |
| fi | |
| - name: Archive results | |
| if: ${{ env.to_archive == 'true' }} | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: train-results | |
| path: /artifacts/** | |
| - name: Flag override | |
| if: ${{ env.to_archive == 'true' }} | |
| run: | | |
| echo "strat to override target_file" | |
| cp -r ${source_file} ${target_file} | |