-
Notifications
You must be signed in to change notification settings - Fork 209
57 lines (54 loc) · 2 KB
/
check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Regression
on: # [push]
pull_request:
# pull_request_target:
types: [synchronize, opened, reopened, edited]
jobs:
job1:
runs-on: ubuntu-latest
# Map a step output to a job output
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@v2
with:
ref: refs/pull/${{ github.event.pull_request.number }}/head
- id: step1
run: |
login=${{ github.event.pull_request.user.login }}
echo "$login"
if [ "${{ github.base_ref }}" != "${{ github.head_ref }}" ]; then
echo "FIASCO: base and head branches differs"
exit 1
fi
wget --quiet -c --retry-connrefused --tries=0 https://drive.usercontent.google.com/download\?id\=1grnb60AaZBCwhBqETeKOGh3tW7ggEWDJ\&export\=download\&authuser\=0\&confirm\=t\&uuid\=34a6d91a-d052-4775-b466-1f8234711b74\&at\=APZUnTXSqc-ZLIRoSD-uYPeQYGfk%3A1707491383232 -O cw-20201.tar.gz
docker load < cw-20201.tar.gz
docker run -d -it --name cw-2021 -v $(pwd):/usr/share/compiler-workout berezun/cw-2021
docker exec -t cw-2021 sh test.sh
echo "All checks have successfully passed"
echo "$login" > gitid.txt
echo ${{ github.base_ref }} > base.txt
branch=${{ github.base_ref }}
if [[ ${branch:1:1} -eq 0 ]]
then
echo ${branch:2:1} > assignment_number.txt
else
echo ${branch:1:2} > assignment_number.txt
fi
- name: Check Deadline
run: |
deadline=2024-02-12T23:59
if [[ $(date +'%Y-%m-%d') > $deadline ]];
then
echo "FIASCO: The deadline has expired"
exit 1
fi
- uses: actions/upload-artifact@v2
with:
name: share_info
path: |
gitid.txt
base.txt
assignment_number.txt