Skip to content

Release - main

Release - main #38

Workflow file for this run

name: Release
run-name: Release - ${{ github.ref_name }}
on:
push:
branches:
- main
jobs:
test:
name: Test
uses: ./.github/workflows/test.yml
static-analysis:
name: Static Analysis
needs: test
uses: ./.github/workflows/static-analysis.yml
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build-and-push:
name: Build
uses: ./.github/workflows/build.yml
needs: [static-analysis, test]
with:
ECR_REGION: ${{vars.ECR_REGION}}
ECR_REPOSITORY: ${{vars.ECR_REPOSITORY}}
secrets:
ECR_ROLE_TO_ASSUME: ${{ secrets.ECR_ROLE_TO_ASSUME }}
scan-image:
uses: ./.github/workflows/scan-image.yml
needs: build-and-push
with:
ECR_REPOSITORY: ${{vars.ECR_REPOSITORY}}
ECR_REGION: ${{vars.ECR_REGION}}
secrets:
ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }}
ECR_ROLE_TO_ASSUME: ${{ secrets.ECR_ROLE_TO_ASSUME }}
deploy-staging:
name: Staging
uses: ./.github/workflows/deploy.yml
needs: build-and-push
with:
environment: staging
ECR_REGION: ${{vars.ECR_REGION}}
ECR_REPOSITORY: ${{vars.ECR_REPOSITORY}}
secrets:
ECR_ROLE_TO_ASSUME: ${{ secrets.ECR_ROLE_TO_ASSUME }}
ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }}
KUBE_CERT: ${{ secrets.KUBE_CERT }}
KUBE_CLUSTER: ${{ secrets.KUBE_CLUSTER }}
KUBE_NAMESPACE: ${{ secrets.KUBE_NAMESPACE }}
KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }}
deploy-production:
name: Production
uses: ./.github/workflows/deploy.yml
needs: deploy-staging
with:
environment: production
ECR_REGION: ${{vars.ECR_REGION}}
ECR_REPOSITORY: ${{vars.ECR_REPOSITORY}}
secrets:
ECR_ROLE_TO_ASSUME: ${{ secrets.ECR_ROLE_TO_ASSUME }}
ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }}
KUBE_CERT: ${{ secrets.KUBE_CERT }}
KUBE_CLUSTER: ${{ secrets.KUBE_CLUSTER }}
KUBE_NAMESPACE: ${{ secrets.KUBE_NAMESPACE }}
KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }}