This commit is contained in:
		
							parent
							
								
									f810209122
								
							
						
					
					
						commit
						f128933252
					
				|  | @ -1,11 +1,10 @@ | ||||||
| #!/usr/bin/bash | #!/usr/bin/bash | ||||||
| set -ex | set -ex | ||||||
| 
 | 
 | ||||||
| if [ -z "$1" ]; then | ORG_NAME=$(basename "$(dirname "$(pwd)")") | ||||||
|     COURSE=$(hostname | cut -d'/' -f2 | cut -d'-' -f1) | REPO_NAME=$(basename "$(pwd)") | ||||||
| else | 
 | ||||||
|     COURSE="$1" | COURSE=${REPO_NAME%-*} | ||||||
| fi |  | ||||||
| CONFIG_REPO_PATH="/home/tt/.cache/$COURSE-config" | CONFIG_REPO_PATH="/home/tt/.cache/$COURSE-config" | ||||||
| GRADING_REPO_PATH="/home/tt/.cache/$COURSE-joj" | GRADING_REPO_PATH="/home/tt/.cache/$COURSE-joj" | ||||||
| GIT_USER="bot-$COURSE" | GIT_USER="bot-$COURSE" | ||||||
|  | @ -40,3 +39,8 @@ if ! git -C "$CONFIG_REPO_PATH" diff --staged --quiet; then | ||||||
|     git -C "$CONFIG_REPO_PATH" commit -m "chore: joj3-forge convert [skip ci]" |     git -C "$CONFIG_REPO_PATH" commit -m "chore: joj3-forge convert [skip ci]" | ||||||
|     git -C "$CONFIG_REPO_PATH" push |     git -C "$CONFIG_REPO_PATH" push | ||||||
| fi | fi | ||||||
|  | if [ -n "$TEAPOT_GITEA_TOKEN" ]; then | ||||||
|  |     mkdir -p /home/tt/.config/teapot | ||||||
|  |     echo "GITEA_ORG_NAME=$ORG_NAME" >"/home/tt/.config/teapot/teapot.env" | ||||||
|  |     echo "GITEA_ACCESS_TOKEN=$TEAPOT_GITEA_TOKEN" >>"/home/tt/.config/teapot/teapot.env" | ||||||
|  | fi | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user