Skip to content

Commit 401de6e

Browse files
authored
fix: skip no context (#2)
fix #1
1 parent 01e23d9 commit 401de6e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/deploy-circleci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ jobs:
2020
run: |
2121
circleci setup --no-prompt --host=https://circleci.com --token=${{ secrets.CIRCLECI_TOKEN }}
2222
23-
- name: Delete CircleCI Context
23+
- name: Check and Delete CircleCI Context
2424
run: |
25-
circleci context delete --org-id ${{ secrets.CIRCLECI_ORG_ID }} checkincontext --force
25+
if circleci context list --org-id ${{ secrets.CIRCLECI_ORG_ID }} | grep -q "checkincontext"; then
26+
circleci context delete --org-id ${{ secrets.CIRCLECI_ORG_ID }} checkincontext --force
27+
else
28+
echo "Context does not exist, skipping deletion"
29+
fi
2630
2731
- name: Create CircleCI Context
2832
run: |

0 commit comments

Comments
 (0)