Skip to content

Commit

Permalink
chore(staging): adding triggers for staging environments through GH (#…
Browse files Browse the repository at this point in the history
…5026)

Currently the staging trigger is through another CI. This is moving the
triggers from staging deployments directly from Github, similar to
canary releases through Github Actions and repository dispatches.
  • Loading branch information
jeffchew authored Jan 28, 2021
1 parent 1e14abe commit c2d8d13
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: publish-staging (Trigger staging environments to update)

on:
push:
tags:
- 'v*'

jobs:
publish:
runs-on: ubuntu-16.04
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@master
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Deploy NextJS Staging
uses: peter-evans/repository-dispatch@v1
with:
repository: carbon-design-system/carbon-for-ibm-dotcom-nextjs-test
token: ${{ secrets.GH_DISPATCH_TOKEN }}
event-type: deploy-staging
- name: Deploy Web Components HTML Staging
uses: peter-evans/repository-dispatch@v1
with:
repository: carbon-design-system/carbon-for-ibm-dotcom-web-components-test
token: ${{ secrets.GH_DISPATCH_TOKEN }}
event-type: deploy-staging
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
if: failure()

0 comments on commit c2d8d13

Please sign in to comment.