forked from mtusi2026/mtusi2026lab3
ci: публиковать результаты в ветку lab3-results
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,11 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# Новый push отменяет незавершённый прогон той же ветки.
|
||||
concurrency:
|
||||
group: lab3-stand-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
PYTHONUTF8: "1"
|
||||
|
||||
@@ -89,3 +94,33 @@ jobs:
|
||||
with:
|
||||
name: track1-${{ matrix.series }}
|
||||
path: evidence/track1/
|
||||
|
||||
# api.github.com недоступен из сети разработчика, а github.com (git) — доступен,
|
||||
# поэтому все артефакты дополнительно публикуются в ветку lab3-results.
|
||||
publish:
|
||||
name: Публикация результатов в ветку lab3-results
|
||||
needs: [levels-3-4, track1]
|
||||
if: always()
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: collected
|
||||
- name: Commit в lab3-results
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git checkout -q --orphan lab3-results
|
||||
git rm -rf -q .
|
||||
{ echo "source_commit=${{ github.sha }}"
|
||||
echo "run=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo "levels_3_4=${{ needs.levels-3-4.result }}"
|
||||
echo "track1=${{ needs.track1.result }}"; } > collected/RUN.txt
|
||||
cp -r collected/. .
|
||||
rm -rf collected
|
||||
git add -A
|
||||
git commit -q -m "results for ${{ github.sha }}"
|
||||
git push -f origin lab3-results
|
||||
|
||||
Reference in New Issue
Block a user