Skip to content

Update ce.yml

Update ce.yml #17

Workflow file for this run

name: diopi 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 result=0 || export result=1
if [ $result -eq 0 ]; then
echo "The file content is the same,results have been collected"
echo $results
echo "results=$result" >> "$GITHUB_OUTPUT"
fi
# - name: Archive results
# if: ${{ needs.Archive_Results.outputs.results == 1 }}
# uses: actions/upload-artifact@v3
# with:
# name: train-results
# path: /artifacts/**
- name: Flag override
if: ${{ needs.Archive_Results.outputs.results == 1 }}
run: |
echo ${{ needs.Archive_Results.outputs.results }}
cp -r ${source_file} ${target_file}