fix(campaign): only send notices to updated articles' authors #1909
Workflow file for this run
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: Push Schema to Apollo | |
on: | |
pull_request: | |
branches: | |
- master | |
- develop | |
- stage | |
types: | |
- closed | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
jobs: | |
push_schema: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Get Version | |
id: version | |
uses: martinbeentjes/npm-get-version-action@master | |
- name: Cache NPM dependencies | |
uses: actions/cache@v3 | |
id: node_modules_cache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-v18-npm-v3-${{ hashFiles('package-lock.json') }} | |
- name: Install Dependencies | |
if: steps.node_modules_cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Install Apollo Rover | |
run: npm install --force @apollo/rover | |
- name: Push Schema (develop) | |
if: github.base_ref == 'develop' | |
run: npm run schema:push:dev | |
env: | |
APOLLO_KEY: ${{ secrets.DEVELOP_APOLLO_API_KEY }} | |
# - name: Push Schema (stage) | |
# if: github.base_ref == 'stage' | |
# run: npm run schema:push | |
# env: | |
# APOLLO_KEY: ${{ secrets.STAGE_APOLLO_API_KEY }} | |
- name: Push Schema (production) | |
if: github.base_ref == 'master' | |
run: npm run schema:push:prod | |
env: | |
APOLLO_KEY: ${{ secrets.PROD_APOLLO_API_KEY }} | |
- name: Slack Notification | |
if: always() | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: matters-server | |
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took |