Skip to content

Commit

Permalink
chore: add example app and release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Datron committed Sep 2, 2024
1 parent d142ce5 commit 9a412fb
Show file tree
Hide file tree
Showing 21 changed files with 26,237 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ALLOW_DIFF_KEYS_OVERLAPPING_CTX=true
ALLOW_SAME_KEYS_NON_OVERLAPPING_CTX=true
CAC_HOST="http://localhost:8080"
API_HOSTNAME="http://localhost:8080"
CONTEXT_AWARE_CONFIG_VERSION="v0.1.0"
SUPERPOSITION_VERSION="v0.1.0"
HOSTNAME="<application_name>-<deployment_id>-<replicaset>-<pod>"
MJOS_ALLOWED_ORIGINS=https://potato.in,https://onion.in,http://localhost:8080
ACTIX_KEEP_ALIVE=120
Expand All @@ -25,4 +25,4 @@ TENANT_MIDDLEWARE_EXCLUSION_LIST="/health,/assets/favicon.ico,/pkg/frontend.js,/
SERVICE_PREFIX=""
SERVICE_NAME="CAC"
MANDATORY_DIMENSIONS=""
# MANDATORY_DIMENSIONS="dev:clientId,fare;test:fare"
# MANDATORY_DIMENSIONS="dev:clientId,fare;test:fare"
52 changes: 52 additions & 0 deletions .github/workflows/docker_image_gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Create docker images

on: workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.SUPERPOSITION_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get latest tag
id: git_tag
shell: bash
run: |
docker_tag=`git tag -l --sort=-creatordate | grep "^v" | head -n 1 | sed 's/^v//'`
echo "docker_tag=$docker_tag" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push production image
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
tags: datron1/superposition:${{ steps.git_tag.outputs.docker_tag }},datron1/superposition:latest

- name: Build and push example image
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
file: ./example.Dockerfile
tags: datron1/superposition-demo-app:${{ steps.git_tag.outputs.docker_tag }}, datron1/superposition-demo-app:latest
Loading

0 comments on commit 9a412fb

Please sign in to comment.