ci(mergify): upgrade configuration to current format #700
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
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
name: Test | |
on: [push, pull_request] | |
jobs: | |
slack: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main') | |
outputs: | |
message-id: ${{ steps.slack.outputs.message-id }} | |
steps: | |
- name: 'Notify Slack: Started' | |
uses: someimportantcompany/github-actions-slack-message@v1 | |
id: slack | |
with: | |
channel: ${{ secrets.SLACK_CHANNEL_ID }} | |
bot-token: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
text: 'Developer Portal Search Deployment: Started' | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: shellcheck | |
uses: reviewdog/action-shellcheck@v1 | |
with: | |
level: info | |
fail_on_error: true | |
shellcheck_flags: --severity=style | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
node-version: '14.x' | |
cache: npm | |
- run: npm ci | |
- run: npm run check | |
- run: npm run test | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: docker compose up | |
run: .github/scripts/docker_compose_up_test.sh | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: logs | |
path: | | |
*.log | |
search.html | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [docker, test] | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
node-version: '14.x' | |
cache: npm | |
- run: npm ci | |
- name: Deploy to search.developer.stage.swedbankpay.com | |
if: github.ref == 'refs/heads/develop' | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: developer-portal-search-stage | |
slot-name: production | |
publish-profile: ${{ secrets.AzureAppService_PublishProfile_1043a8e4641b4abcbfda30028fb8c291 }} | |
package: . | |
- name: Deploy to search.developer.swedbankpay.com | |
if: github.ref == 'refs/heads/main' | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: developer-portal-search-prod | |
slot-name: production | |
publish-profile: ${{ secrets.AzureAppService_PublishProfile_39f808f697834877a436c3dbe8c2b3d4 }} | |
package: . | |
slack-end: | |
runs-on: ubuntu-latest | |
needs: [slack, deploy] | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main') | |
steps: | |
- name: 'Notify Slack: Success' | |
if: success() | |
uses: someimportantcompany/github-actions-slack-message@v1 | |
with: | |
channel: ${{ secrets.SLACK_CHANNEL_ID }} | |
bot-token: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
message-id: ${{ needs.slack.outputs.message-id }} | |
text: 'Developer Portal Search Deployment: Success' | |
color: good | |
- name: 'Notify Slack: Failure' | |
if: failure() | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
uses: someimportantcompany/github-actions-slack-message@v1 | |
with: | |
channel: ${{ secrets.SLACK_CHANNEL_ID }} | |
bot-token: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
message-id: ${{ needs.slack.outputs.message-id }} | |
text: 'Developer Portal Search Deployment: Failure' | |
color: danger |