-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c8d542
commit 97f6b55
Showing
3 changed files
with
56 additions
and
94 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,41 @@ | ||
name: Deploy | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Build Docker Image] | ||
types: | ||
- completed | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
env: | ||
QUALIFIER: "analytics" | ||
AUTH_CLIENT_NAME: ${{ secrets.AUTH_CLIENT_NAME }} | ||
AUTH_CLIENT_SECRET: ${{ secrets.AUTH_CLIENT_SECRET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
|
||
container: | ||
image: 'ghcr.io/nasa-impact/veda-features-api:latest' | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Bootstrap | ||
shell: bash | ||
run: | | ||
cd /opt | ||
cdk bootstrap --qualifier ${QUALIFIER} --toolkit-stack-name ${QUALIFIER} | ||
- name: Synth | ||
shell: bash | ||
run: | | ||
cd /opt | ||
cdk synth --qualifier ${QUALIFIER} --toolkit-stack-name ${QUALIFIER} | ||
- name: Deploy | ||
shell: bash | ||
- 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-west-2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
|
||
- name: Install cdk | ||
run: npm install -g | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd /opt | ||
cdk deploy --qualifier ${QUALIFIER} --toolkit-stack-name ${QUALIFIER} | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements-cdk.txt | ||
# Build and Deploy CDK application | ||
- name: Build & Deploy | ||
run: npm run cdk deploy tifeatures-timvt-staging -- --require-approval never |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Create tags | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create a GitHub release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} |