Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: remove Azure SQL DB restore workflow #349

Merged
merged 4 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 0 additions & 92 deletions .github/workflows/azure-sqldb-restore.yml

This file was deleted.

5 changes: 5 additions & 0 deletions docs/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
- Don't create reusable workflows containing a single step.
This adds unnecessary complexity to the workflow chain.

- Workflows should depend on source code, e.g. using the `actions/checkout` or `actions/download-artifact` actions.

For workflows that don't depend on source code, consider using another automation system instead,
e.g. [Azure Automation](https://learn.microsoft.com/en-us/azure/automation/overview) for automating tasks in Azure.

- Don't create conditionals based on the event that triggered the workflow, for example:

```yaml
Expand Down
42 changes: 0 additions & 42 deletions docs/usage-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,48 +223,6 @@ Prerequisites:

- [Configure Azure credentials](../scripts/oidc/README.md)

## Deploy Azure SQL database restore

Example:

```yaml
name: 🐬 Deploy Azure SQL DB restore
run-name: Deploy Azure SQL DB restore to ${{ inputs.environment }}

on:
workflow_dispatch:
inputs:
environment:
description: Deploy database to environment
type: choice
options: [dev, test, qa, prod]
default: dev

target_backup_time:
description: Restore database to target backup time (in "yyyy/MM/dd HH:mm:ss" format)
type: string
required: true

jobs:
deploy:
name: Deploy ${{ inputs.environment }}
uses: equinor/ops-actions/.github/workflows/azure-sqldb-restore.yml@<release>
with:
environment: ${{ inputs.environment }}
server_name: sql-foobar-${{ inputs.environment }}
database_name: sqldb-foobar-${{ inputs.environment }}
target_backup_time: ${{ inputs.target_backup_time }}
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
```

Prerequisites:

- [Configure Azure credentials](../scripts/oidc/README.md)
- Azure role `SQL Server Contributor` must be assigned at the subscription scope

## Deploy MkDocs to GitHub Pages

Example:
Expand Down
Loading