Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions template/.github/workflows/ci.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
path: {% endraw %}{{ app_name }}{% raw %}_app/.output/public/**/*
if-no-files-found: error

{% endraw %}{% if use_staging_environment %}{% raw %} plan-to-staging:
{% endraw %}{% if use_staging_environment %}{% raw %} pulumi-staging:
uses: ./.github/workflows/pulumi-aws.yml
permissions:
contents: write # needed for mutex
Expand All @@ -96,9 +96,10 @@ jobs:
DEPLOY_SCRIPT_NAME: pulumi_deploy
PULUMI_PREVIEW: true
PREVIEW_ROLE_NAME: InfraPreview--{% endraw %}{{ repo_name }}{% raw %}
PULUMI_UP: false
PULUMI_UP: ${{ github.ref == 'refs/heads/main' }}
PULUMI_UP_ROLE_NAME: InfraDeploy--{% endraw %}{{ repo_name }}{% raw %}
AWS_ACCOUNT_ID: "{% endraw %}{{ aws_staging_account_id }}{% raw %}"
SHOW_PREVIEW_COMMENT_ON_PR: ${{ github.event_name == 'pull_request' }}
DOWNLOAD_ARTIFACT_NAME: app-frontend-static-assets
DOWNLOAD_ARTIFACT_PATH: {% endraw %}{{ app_name }}{% raw %}_app/.output/public/{% endraw %}{% endif %}{% raw %}

Expand All @@ -107,7 +108,8 @@ jobs:
uses: ./.github/workflows/pulumi-aws.yml
needs:
- build-app-frontend
- check-skip-duplicate
- check-skip-duplicate{% endraw %}{% if use_staging_environment %}{% raw %}
- pulumi-staging{% endraw %}{% endif %}{% raw %}
if: needs.check-skip-duplicate.outputs.should-run == 'true' && (github.event_name == 'pull_request' || github.event_name == 'merge_group' || github.ref == 'refs/heads/main')
permissions:
id-token: write # needed to assume OIDC roles (e.g. for downloading from CodeArtifact)
Expand Down Expand Up @@ -138,7 +140,7 @@ jobs:
needs:
- get-values
- lint{% endraw %}{% if use_staging_environment %}{% raw %}
- plan-to-staging{% endraw %}{% endif %}{% raw %}
- pulumi-staging{% endraw %}{% endif %}{% raw %}
- build-app-frontend
- pulumi-prod
- check-skip-duplicate
Expand All @@ -155,7 +157,7 @@ jobs:
[[ ! "${{ needs.check-skip-duplicate.result }}" =~ $success_pattern ]] ||
[[ ! "${{ needs.lint.result }}" =~ $success_pattern ]] ||
[[ ! "${{ needs.build-app-frontend.result }}" =~ $success_pattern ]] ||{% endraw %}{% if use_staging_environment %}{% raw %}
[[ ! "${{ needs.plan-to-staging.result }}" =~ $success_pattern ]] ||{% endraw %}{% endif %}{% raw %}
[[ ! "${{ needs.pulumi-staging.result }}" =~ $success_pattern ]] ||{% endraw %}{% endif %}{% raw %}
[[ ! "${{ needs.pulumi-prod.result }}" =~ $success_pattern ]] ||
[[ ! "${{ needs.confirm-on-tagged-copier-template.result }}" =~ $success_pattern ]]; then
echo "❌ One or more jobs did not finish with skipped or success"
Expand Down