Skip to content

Commit

Permalink
chore: add azure janitor in dry-run
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Case <richard.case@suse.com>
  • Loading branch information
richardcase committed Oct 20, 2023
1 parent 702d1b7 commit 259ce75
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/e2e-long.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ jobs:
with:
name: artifacts
path: _artifacts
- name: Cleanup Azure Resources
if: always()
uses: rancher-sandbox/azure-janitor@v0.1.1
with:
resource-groups: highlander-e2e*
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID}}
client-id: ${{ secrets.AZURE_CLIENT_ID}}
client-secret: ${{ secrets.AZURE_CLIENT_SECRET}}
tenant-id: ${{ secrets.AZURE_TENANT_ID}}
commit: false
- name: Send failed status to slack
if: failure()
uses: slackapi/slack-github-action@v1.24.0
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/janitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Janitor

on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:

jobs:
janitor:
name: azure-janitor
runs-on: ubuntu-latest
steps:
- name: Cleanup
uses: rancher-sandbox/azure-janitor@v0.1.1
with:
resource-groups: highlander-e2e*
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID}}
client-id: ${{ secrets.AZURE_CLIENT_ID}}
client-secret: ${{ secrets.AZURE_CLIENT_SECRET}}
tenant-id: ${{ secrets.AZURE_TENANT_ID}}
commit: false

0 comments on commit 259ce75

Please sign in to comment.