Build docker for the Custom Component Sample #123
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
name: Build docker for the Custom Component Sample | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- "custom-component-dapr/**" | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x, 16.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: 'Install dependencies and Build' | |
shell: bash | |
run: | | |
pushd './custom-component-dapr' | |
npm ci | |
npm run build --if-present | |
popd | |
- name: 'Check for outdated dependencies' | |
shell: bash | |
run: | | |
pushd './custom-component-dapr' | |
npm outdated --ignore-packages [email protected] | |
popd | |
- name: 'Build Docker Image' | |
shell: bash | |
run: | | |
pushd './custom-component-dapr' | |
make build-image | |
popd | |
- name: Slack Notify | |
uses: rtCamp/[email protected] | |
if: ${{ failure() }} | |
env: | |
SLACK_MESSAGE: 'Build Failed for ${{ env.SAMPLE_NAME }}' | |
SLACK_WEBHOOK: ${{ secrets.BUILD_FAIL_NOTIFY_SLACK_URL }} |