Skip to content

Feature/environment per branch 2 #1

Feature/environment per branch 2

Feature/environment per branch 2 #1

Workflow file for this run

name: Close Pull Request
on:
pull_request:
types: [ closed ]
jobs:
teardown_pr_environment:
name: Teardown Cloud Run PR environment
steps:
- uses: 'actions/checkout@v3'
- name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v1'
with:
workload_identity_provider: ${{ secrets.GOOGLE_CLOUD_WIP }}
service_account: ${{ secrets.GOOGLE_CLOUD_SERVICE_ACCOUNT }}
- name: Set up Cloud SDK
uses: 'google-github-actions/setup-gcloud@v1'
with:
version: '>= 435.0.0'
- name: Get Docker image tag from GITHUB_REF
id: docker-image-tag-from-ref
uses: ./.github/actions/docker-image-tag-from-ref
- name: Remove PR environment if exists
run: |
service_name="argilla-quickstart-${{ steps.docker-image-tag-from-ref.outputs.docker-image-tag }}"
services=$(gcloud run services list --project=argilla-ci --format="value(metadata.name)")
if echo "$services" | grep -q "$service_name"; then
echo "Service '$service_name' exists. Removing it..."
gcloud run services delete $service_name --project=argilla-ci --region=europe-southwest1 --quiet
else
echo "Service $service_name does not exist."
fi
secrets: inherit

Check failure on line 38 in .github/workflows/close-pr.yml

View workflow run for this annotation

GitHub Actions / Close Pull Request

Invalid workflow file

The workflow is not valid. .github/workflows/close-pr.yml (Line: 38, Col: 5): Unexpected value 'secrets' .github/workflows/close-pr.yml (Line: 9, Col: 5): Required property is missing: runs-on