docs: fix readme #16
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
--- | |
name: Staging/Prod | Build And Deploy | |
on: | |
push: | |
branches: [main] | |
env: | |
REGISTRY: ghcr.io | |
jobs: # We need two separate builds as each is going to a different ECR repo | |
build-staging: | |
permissions: | |
packages: write | |
id-token: write | |
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-build.yaml@main | |
secrets: | |
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} | |
aws_role_id: ${{ secrets.AWS_ROLE_ID }} | |
aws_region: ${{ secrets.AWS_REGION }} | |
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY_STAGING }} | |
build-prod: | |
permissions: | |
packages: write | |
id-token: write | |
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-build.yaml@main | |
secrets: | |
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} | |
aws_role_id: ${{ secrets.AWS_ROLE_ID }} | |
aws_region: ${{ secrets.AWS_REGION }} | |
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY }} | |
deploy-content-to-staging: | |
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-deploy.yaml@main | |
permissions: | |
id-token: write | |
needs: build-staging | |
with: | |
deploy_to_environment: staging | |
lambda: staging-ep-publishing-content | |
docker_image_version: ${{ needs.build-staging.outputs.build_date }} | |
secrets: | |
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} | |
aws_role_id: ${{ secrets.AWS_ROLE_ID }} | |
aws_region: ${{ secrets.AWS_REGION }} | |
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY_STAGING }} | |
deploy-advertisement-to-staging: | |
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-deploy.yaml@main | |
permissions: | |
id-token: write | |
needs: build-staging | |
with: | |
deploy_to_environment: staging | |
lambda: staging-ep-publishing-advertisement | |
docker_image_version: ${{ needs.build-staging.outputs.build_date }} | |
secrets: | |
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} | |
aws_role_id: ${{ secrets.AWS_ROLE_ID }} | |
aws_region: ${{ secrets.AWS_REGION }} | |
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY_STAGING }} | |
deploy-content-to-prod: | |
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-deploy.yaml@main | |
permissions: | |
id-token: write | |
needs: build-prod | |
with: | |
deploy_to_environment: prod | |
lambda: publishing-content | |
docker_image_version: ${{ needs.build-prod.outputs.build_date }} | |
secrets: | |
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} | |
aws_role_id: ${{ secrets.AWS_ROLE_ID }} | |
aws_region: ${{ secrets.AWS_REGION }} | |
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY }} | |
deploy-advertisement-to-prod: | |
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-deploy.yaml@main | |
permissions: | |
id-token: write | |
needs: build-prod | |
with: | |
deploy_to_environment: prod | |
lambda: publishing-advertisement | |
docker_image_version: ${{ needs.build-prod.outputs.build_date }} | |
secrets: | |
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} | |
aws_role_id: ${{ secrets.AWS_ROLE_ID }} | |
aws_region: ${{ secrets.AWS_REGION }} | |
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY }} |