Skip to content

Commit

Permalink
Merge pull request #225 from richardcase/add_azure_janitor
Browse files Browse the repository at this point in the history
chore: add azure janitor in dry-run
  • Loading branch information
richardcase committed Oct 23, 2023
2 parents fc55866 + 259ce75 commit c962726
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 c962726

Please sign in to comment.