-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add PR cleanup, swap to prod workflows (#121)
- Loading branch information
Showing
7 changed files
with
68 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,6 @@ indent_style = space | |
|
||
[*.{js,json}] | ||
indent_size = 2 | ||
|
||
[*.sh] | ||
end_of_line = lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Delete a preview environment | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
env: | ||
SLOT_NAME: pr-${{ github.event.number }} | ||
|
||
jobs: | ||
delete-slot: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Log into Azure CLI with service principal | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Delete slot on staging site | ||
run: az webapp deployment slot delete --resource-group ${{ vars.AZURE_RESOURCE_GROUP }} --name ${{ vars.AZURE_WEBAPP_NAME}} --slot ${{ env.SLOT_NAME }} | ||
|
||
delete-deployment: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Delete Deployment Environment | ||
uses: strumwolf/delete-deployment-environment@v2 | ||
with: | ||
environment: "pr-${{ github.event.number }}" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
onlyRemoveDeployments: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Swap staging slot contents into production | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
promote-to-production: | ||
name: Promote to production | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: 'Production' | ||
url: 'https://${{ vars.AZURE_WEBAPP_NAME }}.azurewebsites.net/' | ||
|
||
steps: | ||
- name: Log into Azure CLI with service principal | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Swap slots | ||
run: az webapp deployment slot swap -s ${{ vars.STAGING_SLOT_NAME }} -n ${{ vars.AZURE_WEBAPP_NAME }} -g ${{ vars.AZURE_RESOURCE_GROUP }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.5-bin.zip | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip | ||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters