Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

fix: update deployment scripts #26

fix: update deployment scripts

fix: update deployment scripts #26

Workflow file for this run

name: Release
on:
pull_request:
branches:
- main
# types:
# - closed
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
Deploy:
# if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
runs-on: ubuntu-latest
environment: Production
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/GitHubDeployBase
role-session-name: ${{ vars.SESSION_NAME }}
aws-region: ${{ vars.AWS_REGION }}
- name: SAM Deploy Role
run: |
cd infra/deploy
sam build
sam package
sam deploy --no-fail-on-empty-changeset
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/deploy-core-account-subscription-estimate
role-session-name: ${{ vars.SESSION_NAME }}
aws-region: ${{ vars.AWS_REGION }}
- name: SAM Deploy Step Function
run: |
make compile
make build flags="--parameter-overrides ApiAuthorization=${{ secrets.API_AUTHORIZATION }} OceanAccount=${{ secrets.AWS_ACCOUNT_ID }}"
make package
make deploy flags="--parameter-overrides ApiAuthorization=${{ secrets.API_AUTHORIZATION }} OceanAccount=${{ secrets.AWS_ACCOUNT_ID }} --no-fail-on-empty-changeset"
- name: Get Version
id: semver
uses: ietf-tools/semver-action@v1
with:
token: ${{ github.token }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.semver.outputs.nextStrict }}