Step script added to create secrets in gh.
Co-authored-by: jmhbnz <mail@jamesblair.net>
This commit is contained in:
		
							
								
								
									
										27
									
								
								.github/workflows/blank.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								.github/workflows/blank.yml
									
									
									
									
										vendored
									
									
								
							@ -22,15 +22,28 @@ jobs:
 | 
			
		||||
 | 
			
		||||
    # Steps represent a sequence of tasks that will be executed as part of the job
 | 
			
		||||
    steps:
 | 
			
		||||
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
 | 
			
		||||
      # gitlab secrets variables
 | 
			
		||||
      - name: Login
 | 
			
		||||
        uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
 | 
			
		||||
        with:
 | 
			
		||||
          GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
 | 
			
		||||
          service_account_email: ${{ secrets.GCP_EMAIL }}
 | 
			
		||||
          service_account_key: ${{ secrets.GCP_CREDENTIALS }}
 | 
			
		||||
 | 
			
		||||
      #Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
 | 
			
		||||
      # Runs a single command using the runners shell
 | 
			
		||||
      - name: Run a one-line script
 | 
			
		||||
        run: ls -la && ./1-install-utilities.sh
 | 
			
		||||
      #- name: Run a one-line script
 | 
			
		||||
      #  run: ls -la && ./1-install-utilities.sh
 | 
			
		||||
          
 | 
			
		||||
      # Runs a set of commands using the runners shell
 | 
			
		||||
      #- name: Run a multi-line script
 | 
			
		||||
        #run: |
 | 
			
		||||
          #echo Add other actions to build,
 | 
			
		||||
          #echo test, and deploy your project.
 | 
			
		||||
      - name: Run a multi-line script
 | 
			
		||||
        run: |
 | 
			
		||||
          ./1-install-utilities.sh
 | 
			
		||||
          ./2-configure-gcp-project.sh
 | 
			
		||||
          ./3-create-github-secrets.sh
 | 
			
		||||
          ./4-create-virtual-machine.sh
 | 
			
		||||
          ./5-install-docker.sh
 | 
			
		||||
          ./6-install-gitlab-via-composer.sh
 | 
			
		||||
          ./7-teardown-cloud-resources.sh
 | 
			
		||||
 | 
			
		||||
@ -3,8 +3,9 @@
 | 
			
		||||
 | 
			
		||||
# Once new service account is created and key.json file is created, We will have to upload these details into GitHub and automate the end to end CI/CD workflow.
 | 
			
		||||
 | 
			
		||||
# Tange the shell block below to a shell script by pressing *, b t* in emacs command mode:
 | 
			
		||||
# Tangle the shell block below to a shell script by pressing *, b t* in emacs command mode:
 | 
			
		||||
 | 
			
		||||
# Once new srvice account is created and key.json file is created, We will have to upload these details into GitHub and automate the end to end CI/CD workflow.
 | 
			
		||||
 | 
			
		||||
TODO
 | 
			
		||||
echo $gcp_project_id | gh secret set GCP_PROJECT_ID
 | 
			
		||||
cat key.json | jq '.client_email' -r | gh secret set GCP_EMAIL
 | 
			
		||||
cat key.json | gh secret set GCP_CREDENTIALS
 | 
			
		||||
 | 
			
		||||
@ -104,11 +104,12 @@ gcloud iam service-accounts keys create key.json \
 | 
			
		||||
 | 
			
		||||
Once new service account is created and key.json file is created, We will have to upload these details into GitHub and automate the end to end CI/CD workflow.
 | 
			
		||||
 | 
			
		||||
Tange the shell block below to a shell script by pressing *, b t* in emacs command mode:
 | 
			
		||||
Tangle the shell block below to a shell script by pressing *, b t* in emacs command mode:
 | 
			
		||||
 | 
			
		||||
Once new srvice account is created and key.json file is created, We will have to upload these details into GitHub and automate the end to end CI/CD workflow.
 | 
			
		||||
#+begin_src bash :shebang #!/bin/bash :tangle 3-create-github-secrets.sh
 | 
			
		||||
TODO
 | 
			
		||||
echo $gcp_project_id | gh secret set GCP_PROJECT_ID
 | 
			
		||||
cat key.json | jq '.client_email' -r | gh secret set GCP_EMAIL
 | 
			
		||||
cat key.json | gh secret set GCP_CREDENTIALS
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user