Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
moicalcob committed Jun 4, 2024
1 parent 977840d commit 3888655
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/branch-changes-delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,19 @@ jobs:
REPLICATED_APP: carto
REPLICATED_API_TOKEN: ${{ secrets.REPLICATED_API_TOKEN }}
run: |
CHANNEL_DELETE_REQUIRED="false"
if replicated channel ls | grep -q ${{ steps.generate-channel-info.outputs.channel-name }}; then
echo "channel-exists=true" >> "$GITHUB_OUTPUT"
echo "channel-id=$(replicated channel ls | grep ${{ steps.generate-channel-info.outputs.channel-name }} | awk '{print $1}')" >> "$GITHUB_OUTPUT"
else
echo "channel-exists=false" >> "$GITHUB_OUTPUT"
CHANNEL_DELETE_REQUIRED="true"
fi
echo "channel-exists=${CHANNEL_DELETE_REQUIRED}" >> ${GITHUB_OUTPUT}
- name: Delete channel
if: steps.check-if-channel-exists.outputs.channel-exists == 'true'
shell: bash
env:
REPLICATED_APP: carto
REPLICATED_API_TOKEN: ${{ secrets.REPLICATED_API_TOKEN }}
run: |
replicated channel rm ${{ steps.check-if-channel-exists.outputs.channel-id }}
CHANNEL_ID=$(replicated channel ls | grep ${{ steps.generate-channel-info.outputs.channel-name }} | awk '{print $1}')
replicated channel rm $CHANNEL_ID

0 comments on commit 3888655

Please sign in to comment.