-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (34 loc) · 1.36 KB
/
publish-management-spec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Publish Management API OpenAPI Specification
on:
push:
branches: [master]
tags: [v*]
jobs:
deploy:
name: Deploy OpenAPI Specifications to S3
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Publish CloudFormation Stack
uses: aws-actions/aws-cloudformation-github-deploy@v1
with:
name: developer-exp-management-api-spec-hosting
template: management/cloud-formation-stack.yml
tags: '[{"Key": "BillingGroup", "Value": "Developer Experience"}]'
no-fail-on-empty-changeset: 1
- name: Publish latest specifications to S3
run: |
cd management
aws s3 cp . s3://developer-exp-management-api-specification --recursive --exclude "*" --include "*.yaml" --acl "public-read"
- name: Publish tagged version to S3
if: startsWith(github.ref, 'refs/tags/v')
run: |
cd management
aws s3 cp . s3://developer-exp-management-api-specification/${GITHUB_REF##*/}/ --recursive --exclude "*" --include "*.yaml" --acl "public-read"