Skip to content
Merged
Show file tree
Hide file tree
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
41 changes: 41 additions & 0 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build-and-push-dev
on:
push:
branches: [main]

permissions:
contents: read
id-token: write

env:
AWS_REGION: ap-southeast-2
IMAGE_REPO: 498096047392.dkr.ecr.ap-southeast-2.amazonaws.com/aai-backend

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: docker/setup-buildx-action@v3

# Authenticate to AWS
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ECR_PUSH }}
aws-region: ${{ env.AWS_REGION }}

- uses: aws-actions/amazon-ecr-login@v2

- name: Build & Push (dev only)
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ env.IMAGE_REPO }}:dev
provenance: false
sbom: false
cache-from: type=gha
cache-to: type=gha,mode=max
41 changes: 41 additions & 0 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build-and-push-release
on:
release:
types: [published]

permissions:
contents: read
id-token: write

env:
AWS_REGION: ap-southeast-2
IMAGE_REPO: 498096047392.dkr.ecr.ap-southeast-2.amazonaws.com/aai-backend

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: docker/setup-buildx-action@v3

# Authenticate to AWS
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ECR_PUSH }}
aws-region: ${{ env.AWS_REGION }}

- uses: aws-actions/amazon-ecr-login@v2

- name: Build & Push (release)
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ env.IMAGE_REPO }}:${{ github.event.release.tag_name }}
provenance: false
sbom: false
cache-from: type=gha
cache-to: type=gha,mode=max
11 changes: 11 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: commitlint
on:
pull_request:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v6
28 changes: 28 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: release-please
on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
release-type: docker
token: ${{ secrets.GITHUB_TOKEN }}
changelog-types: |
[
{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"perf","section":"Performance","hidden":false},
{"type":"refactor","section":"Refactoring","hidden":true},
{"type":"docs","section":"Docs","hidden":true},
{"type":"chore","section":"Chores","hidden":true},
{"type":"test","section":"Tests","hidden":true}
]
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0