forked from EVOgeek/Vmeda.Online
		
	MOBILE-3749 github: Prepare workflow
This commit is contained in:
		
							parent
							
								
									4e643a363e
								
							
						
					
					
						commit
						fa78783c07
					
				
							
								
								
									
										25
									
								
								.github/scripts/prepare.sh
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										25
									
								
								.github/scripts/prepare.sh
									
									
									
									
										vendored
									
									
										Executable file
									
								
							| @ -0,0 +1,25 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | source "./.github/scripts/functions.sh" | ||||||
|  | BRANCH=${GITHUB_REF##*/} | ||||||
|  | 
 | ||||||
|  | if [ -z $GIT_TOKEN ] || [ -z $BRANCH ] || [ $GITHUB_REPOSITORY != 'moodlehq/moodleapp' ]; then | ||||||
|  |     print_error "Env vars not correctly defined" | ||||||
|  |     exit 1 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | print_title "Run prepare scripts" | ||||||
|  | # TODO Change branch name. | ||||||
|  | git clone --depth 1 --single-branch --branch ionic5 https://$GIT_TOKEN@github.com/moodlemobile/apps-scripts.git ../scripts | ||||||
|  | cp ../scripts/*.sh scripts/ | ||||||
|  | 
 | ||||||
|  | if [ ! -f scripts/prepare.sh ]; then | ||||||
|  |     print_error "Prepare file not found" | ||||||
|  |     exit 1 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | print_title 'Prepare Build' | ||||||
|  | ./scripts/prepare.sh | ||||||
|  | 
 | ||||||
|  | if [ $? -ne 0 ]; then | ||||||
|  |     exit 1 | ||||||
|  | fi | ||||||
							
								
								
									
										20
									
								
								.github/workflows/prepare.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								.github/workflows/prepare.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,20 @@ | |||||||
|  | name: Prepare | ||||||
|  | 
 | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     branches: [ master, integration, ionic5, workplace, freemium-master ] | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |   prepare: | ||||||
|  |     if: github.repository == 'moodlemobile/moodleapp' | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  | 
 | ||||||
|  |     steps: | ||||||
|  |     - uses: actions/checkout@v2 | ||||||
|  |       with: | ||||||
|  |         persist-credentials: false | ||||||
|  |         fetch-depth: 0 | ||||||
|  |     - name: Prepare builds | ||||||
|  |       env: | ||||||
|  |         GIT_TOKEN: ${{ secrets.GIT_TOKEN }} | ||||||
|  |       run: ./.github/scripts/prepare.sh | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user