Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
reakaleek committed Jan 22, 2025
1 parent 0141aba commit 88627fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/preview-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
- name: Delete preview deployments
run: |
deployments=$(gh api "/repos/elastic/docs-builder/deployments?environment=preview-${{ github.event.pull_request.number }}" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H 'Accept: application/vnd.github+json' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
| jq -r '.[] | .id')
for deployment in $deployments; do
gh api "/repos/elastic/docs-builder/deployments/$deployment/statuses" \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-f state="inactive" \
-f description="Marking deployment as inactive"
-H 'Accept: application/vnd.github+json' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
-f 'state=inactive' \
-f 'description=Marking deployment as inactive'
gh api "/repos/elastic/docs-builder/deployments/$deployment" -X DELETE
done
4 changes: 2 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
-f 'ref=${{ github.event.pull_request.head.ref }}' \
-f 'environment=preview-${{ github.event.pull_request.number }}' \
-f 'description=Preview deployment for PR ${{ github.event.pull_request.number }}' \
-f 'auto_merge=false' \
-f 'required_contexts=[]' \
-f auto_merge=false \
-f required_contexts=[] \
--jq '.id')
gh api "/repos/${{ github.repository }}/deployments/$deployment_id/statuses" \
Expand Down

0 comments on commit 88627fe

Please sign in to comment.