Skip to content

fix: panic with divide by zero duration math (#184) #173

fix: panic with divide by zero duration math (#184)

fix: panic with divide by zero duration math (#184) #173

Workflow file for this run

name: Publish and Deploy Image
on:
push:
branches: [ "main" ]
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
publish:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Public ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws
username: ${{ env.AWS_ACCESS_KEY_ID }}
password: ${{ env.AWS_SECRET_ACCESS_KEY }}
env:
AWS_REGION: us-east-1
-
name: Build and Publish
run: |
SHA_TAG=$(echo ${{ github.SHA }} | head -c 12)
if [[ ${{ contains(github.event.head_commit.message, 'chore: Release') }} == 'true' ]]; then
RELEASE_TAG=$(cargo metadata --format-version=1 --no-deps | jq '.packages[0].version' | tr -d '"')
fi
make SHA="${{ github.SHA }}" SHA_TAG="$SHA_TAG" RELEASE_TAG="$RELEASE_TAG" publish-docker
deploy:
runs-on: ubuntu-latest
needs:
- publish
strategy:
fail-fast: false
matrix:
network: [dev, qa]
steps:
-
uses: actions/checkout@v3
-
name: Schedule ECS deployment
run: |
deploy_target="latest"
deploy_tag=$(echo ${{ github.SHA }} | head -c 12)
# If this workflow was run for a release, indicate that this is a release deployment.
if [[ ${{ contains(github.event.head_commit.message, 'chore: Release') }} == 'true' ]]; then
deploy_target="release"
deploy_tag=$(cargo metadata --format-version=1 --no-deps | jq '.packages[0].version' | tr -d '"')
fi
make DEPLOY_ENV="${{ matrix.network }}" DEPLOY_TARGET="$deploy_target" DEPLOY_TAG="$deploy_tag" schedule-deployment