Skip to content
Snippets Groups Projects
Select Git revision
  • cbc01ab86ee57ca88abbacdcfa2d4f0fbca0417c
  • main default protected
  • drip-server-timing
  • compress-middleware
  • v2.11.0
  • v2.10.0
  • v2.9.2
  • v2.9.1
  • v2.9.0
  • v2.8.0
  • v2.7.0
  • v2.6.0
  • v2.5.6
  • v2.5.5
  • v2.5.4
  • v2.5.3
  • v2.5.2
  • v2.5.1
  • v2.5.0
  • v2.4.2
  • v2.4.1
  • v2.4.0
  • v2.3.0
  • v2.2.2
24 results

cleanup.yaml

Blame
    • Will McCutchen's avatar
      cbc01ab8
      Setup continuous deploys to staging and production: · cbc01ab8
      Will McCutchen authored
      - Pull requests whose tests pass are deployed automatically to a
        preproduction version named "pr<number>"
      
      - Pushes to master whose tests pass are deployed automatically to the
        primary version (hopefully, can't test until merge)
      
      - Closing a pull request removes staging deploys (hopefully!)
      cbc01ab8
      History
      Setup continuous deploys to staging and production:
      Will McCutchen authored
      - Pull requests whose tests pass are deployed automatically to a
        preproduction version named "pr<number>"
      
      - Pushes to master whose tests pass are deployed automatically to the
        primary version (hopefully, can't test until merge)
      
      - Closing a pull request removes staging deploys (hopefully!)
    cleanup.yaml 955 B
    name: Cleanup
    
    on:
      pull_request:
        branches: [master]
        types: [closed]
    
    jobs:
      cleanup_staging_deploy:
        name: Cleanup Staging Deploy
        runs-on: ubuntu-latest
        steps:
        - name: Checkout
          uses: actions/checkout@v2
    
        - name: Setup gcloud CLI
          uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
          with:
            version: '285.0.0'
            project_id: ${{ secrets.GCP_PROJECT_ID }}
            service_account_email: ${{ secrets.GCP_SA_EMAIL }}
            service_account_key: ${{ secrets.GCP_SA_KEY }}
            export_default_credentials: true
    
        - name: Setup deployment parameters
          id: deployment_params
          run: |
            pr_number=$(jq -r .pull_request.number "$GITHUB_EVENT_PATH")
            echo "::set-output name=version::pr${pr_number}"
    
        - name: Remove deployment
          run: gcloud app gcloud app versions delete --project="${{ secrets.GCP_PROJECT_ID }}" "${{ steps.deployment_params.outputs.version }}"