Skip to content

feat: remove flyway as init container and deploy it as a separate task #186

feat: remove flyway as init container and deploy it as a separate task

feat: remove flyway as init container and deploy it as a separate task #186

Workflow file for this run

name: PR
on:
pull_request:
concurrency:
# Cancel in progress for PR open and close
group: ${{ github.event.number }}
cancel-in-progress: false
permissions:
id-token: write # This is required for requesting the JWT
contents: write # This is required for actions/checkout
packages: write
pull-requests: write
env:
AWS_REGION: ca-central-1
jobs:
# https://github.com/bcgov-nr/action-builder-ghcr
builds:
name: Builds
runs-on: ubuntu-24.04
strategy:
matrix:
package: [backend, migrations, frontend]
timeout-minutes: 10
steps:
- uses: bcgov-nr/[email protected]
with:
keep_versions: 50
package: ${{ matrix.package }}
tag: ${{ github.event.number }}
tag_fallback: latest
triggers: ('${{ matrix.package }}/')
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
target: ${{ github.event.number }}
tags: ${{ github.event.number }}-${{ github.run_number }}
plan-db:
name: Plan Database
uses: ./.github/workflows/.deployer.yml
with:
environment_name: dev
command: plan
working_directory: database
app_env: ephermal-${{ github.event.number }} # ephermal, prefixed for easy clean up of PR resources in s3 and dynamodb generated by terraform
secrets: inherit
plan-api:
name: Plan API
needs: [plan-db]
uses: ./.github/workflows/.deployer.yml
with:
environment_name: dev
command: plan
working_directory: api
tag: ${{ github.event.number }}
app_env: ephermal-${{ github.event.number }}
secrets: inherit
plan-cloudfront:
name: Plan Cloudfront
uses: ./.github/workflows/.deployer.yml
with:
environment_name: dev
command: plan
working_directory: frontend
app_env: ephermal-${{ github.event.number }}
secrets: inherit
tests:
name: Tests
needs: builds
uses: ./.github/workflows/.tests.yml
with:
tag: ${{ github.event.number }}
results:
name: PR Results
needs: [builds, plan-db, plan-api, plan-cloudfront, tests]
if: always()
runs-on: ubuntu-24.04
steps:
- if: contains(needs.*.result, 'failure')||contains(needs.*.result, 'canceled')
run: echo "At least one job has failed." && exit 1
- run: echo "Success!"