Skip to content

Bump actions/setup-node from 2.5.1 to 3.8.1 #408

Bump actions/setup-node from 2.5.1 to 3.8.1

Bump actions/setup-node from 2.5.1 to 3.8.1 #408

Workflow file for this run

name: test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: 'Notify Slack: Started'
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main')
uses: someimportantcompany/github-actions-slack-message@v1
id: slack
with:
channel: ${{ secrets.SLACK_CHANNEL_ID }}
bot-token: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
text: 'Searchyll Index Proxy: Started'
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/[email protected]
with:
node-version: '12'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node
${{ runner.OS }}-
- run: npm ci
- name: Check syntax
run: find . -name "*.js" -not -path "./node_modules/*" -exec node --check {} \;
- run: npm test
- name: Deploy to searchyll-index-proxy-devportal-stage
if: github.ref == 'refs/heads/develop'
uses: azure/webapps-deploy@v2
with:
app-name: searchyll-index-proxy-devportal-stage
slot-name: production
publish-profile: ${{ secrets.AzureAppService_PublishProfile_eb36cf7c47714a8e981ad6fe659f4810 }}
package: .
- name: Deploy to searchyll-index-proxy-devportal-prod
if: github.ref == 'refs/heads/main'
uses: azure/webapps-deploy@v2
with:
app-name: searchyll-index-proxy-devportal-prod
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_fd5cc0e871864564b2890521b3083b1b }}
package: .
- name: 'Notify Slack: Success'
if: success() && github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main')
uses: someimportantcompany/github-actions-slack-message@v1
with:
channel: ${{ secrets.SLACK_CHANNEL_ID }}
bot-token: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
message-id: ${{ steps.slack.outputs.message-id }}
text: 'Searchyll Index Proxy: Success'
color: good
- name: 'Notify Slack: Failure'
if: failure() && github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main')
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: ${{ steps.slack.outputs.message-id }}
text: 'Searchyll Index Proxy: Failure'
color: danger