feat: Support Aptible deployments #9308
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: Platform Pull Requests | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths-ignore: | |
- docs/** | |
- infrastructure/** | |
branches-ignore: | |
- release-please-* | |
jobs: | |
conventional-commit: | |
name: Conventional Commit | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Check PR Conventional Commit title | |
uses: amannn/action-semantic-pull-request@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
types: | # mirrors changelog-sections in the /release-please-config.json | |
feat | |
fix | |
infra | |
ci | |
docs | |
deps | |
perf | |
refactor | |
test | |
chore | |
- name: Auto-label PR with Conventional Commit title | |
uses: bcoe/conventional-release-labels@v1 | |
with: | |
type_labels: | | |
{ | |
"feat": "feature", | |
"fix": "fix", | |
"infra": "infrastructure", | |
"ci": "ci-cd", | |
"docs": "docs", | |
"deps": "dependencies", | |
"perf": "performance", | |
"refactor": "refactor", | |
"test": "testing", | |
"chore": "chore" | |
} | |
ignored_types: '[]' | |
check-permissions: | |
name: Check actor permissions | |
runs-on: ubuntu-latest | |
outputs: | |
can-write: ${{ steps.check.outputs.require-result }} | |
steps: | |
- uses: actions-cool/check-user-permission@main | |
id: check | |
with: | |
require: write | |
docker-prepare-report-comment: | |
if: needs.check-permissions.outputs.can-write == 'true' | |
name: Prepare Docker report comment | |
needs: check-permissions | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github/ | |
sparse-checkout-cone-mode: false | |
- uses: ./.github/actions/docker-build-report-to-pr | |
docker-build-unified: | |
if: github.event.pull_request.draft == false | |
needs: [check-permissions, docker-prepare-report-comment] | |
name: Build Unified Image | |
uses: ./.github/workflows/.reusable-docker-build.yml | |
with: | |
ephemeral: ${{ needs.check-permissions.outputs.can-write == 'false' }} | |
target: oss-unified | |
image-name: flagsmith | |
comment: ${{ needs.check-permissions.outputs.can-write == 'true' }} | |
docker-build-api: | |
if: github.event.pull_request.draft == false | |
needs: [check-permissions, docker-prepare-report-comment] | |
name: Build API Image | |
uses: ./.github/workflows/.reusable-docker-build.yml | |
with: | |
ephemeral: ${{ needs.check-permissions.outputs.can-write == 'false' }} | |
target: oss-api | |
image-name: flagsmith-api | |
comment: ${{ needs.check-permissions.outputs.can-write == 'true' }} | |
docker-build-frontend: | |
if: github.event.pull_request.draft == false | |
needs: [check-permissions, docker-prepare-report-comment] | |
name: Build Frontend Image | |
uses: ./.github/workflows/.reusable-docker-build.yml | |
with: | |
ephemeral: ${{ needs.check-permissions.outputs.can-write == 'false' }} | |
target: oss-frontend | |
image-name: flagsmith-frontend | |
comment: ${{ needs.check-permissions.outputs.can-write == 'true' }} | |
docker-build-api-test: | |
if: github.event.pull_request.draft == false | |
needs: [check-permissions, docker-prepare-report-comment] | |
name: Build API Test Image | |
uses: ./.github/workflows/.reusable-docker-build.yml | |
with: | |
target: api-test | |
image-name: flagsmith-api-test | |
scan: false | |
comment: ${{ needs.check-permissions.outputs.can-write == 'true' }} | |
docker-build-e2e: | |
if: github.event.pull_request.draft == false | |
needs: [check-permissions, docker-prepare-report-comment] | |
name: Build E2E Image | |
uses: ./.github/workflows/.reusable-docker-build.yml | |
with: | |
ephemeral: ${{ needs.check-permissions.outputs.can-write == 'false' }} | |
file: frontend/Dockerfile.e2e | |
image-name: flagsmith-e2e | |
scan: false | |
comment: ${{ needs.check-permissions.outputs.can-write == 'true' }} | |
docker-build-private-cloud: | |
if: github.event.pull_request.draft == false && needs.check-permissions.outputs.can-write == 'true' | |
needs: [check-permissions, docker-prepare-report-comment] | |
name: Build Private Cloud Image | |
uses: ./.github/workflows/.reusable-docker-build.yml | |
with: | |
target: private-cloud-unified | |
image-name: flagsmith-private-cloud | |
comment: true | |
secrets: | |
secrets: | | |
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }} | |
run-e2e-tests: | |
needs: [docker-build-api, docker-build-e2e] | |
uses: ./.github/workflows/.reusable-docker-e2e-tests.yml | |
with: | |
runs-on: ${{ matrix.runs-on }} | |
e2e-image: ${{ needs.docker-build-e2e.outputs.image }} | |
api-image: ${{ needs.docker-build-api.outputs.image }} | |
concurrency: ${{ matrix.args.concurrency }} | |
tests: ${{ matrix.args.tests }} | |
secrets: inherit | |
strategy: | |
matrix: | |
runs-on: [ubuntu-latest, ARM64-2c] | |
args: | |
- tests: segment-part-1 environment | |
concurrency: 1 | |
- tests: segment-part-2 | |
concurrency: 1 | |
- tests: segment-part-3 signup flag invite project | |
concurrency: 2 | |
- tests: versioning | |
concurrency: 1 |