Skip to content

Commit

Permalink
Sample application v1
Browse files Browse the repository at this point in the history
  • Loading branch information
niallthomson committed Feb 21, 2025
1 parent adc5754 commit 7c73e06
Show file tree
Hide file tree
Showing 750 changed files with 37,684 additions and 71,086 deletions.
12 changes: 12 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"customizations": {
"vscode": {
"extensions": [
"mkhl.direnv"
]
}
},
"image": "ghcr.io/cachix/devenv:latest",
"overrideCommand": false,
"updateContentCommand": "devenv test"
}
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export DIRENV_WARN_TIMEOUT=1m

source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="

use devenv
47 changes: 47 additions & 0 deletions .github/actions/publish-artifacts/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Publish artifacts"
description: "Publish container images and helm charts"
inputs:
tag:
description: "Tag ref to publish"
required: true
ecr-repository:
description: "ECR repository for publishing to"
required: true
gh-token:
description: "GitHub token for authentication"
required: true
runs:
using: "composite"
steps:
- name: "Setup Docker"
uses: ./.github/actions/setup-docker

- name: "Setup Env"
uses: ./.github/actions/setup-env

- name: "Upload Release Artifact"
shell: devenv shell bash -- -e {0}
env:
GITHUB_TOKEN: ${{ inputs.gh-token }}
TAG_NAME: ${{ inputs.tag }}
AWS_ECR_REPOSITORY: ${{ inputs.ecr-repository }}
run: |
export IMAGE_TAG=${TAG_NAME#v}
yarn nx run-many -t build --projects=tag:service --parallel=1
# Ensure all containers build
yarn nx run-many -t container --projects=tag:service --tags ${AWS_ECR_REPOSITORY}/retail-store-sample-{projectName}:${IMAGE_TAG} --configuration publish --push false
# Then push
yarn nx run-many -t container --projects=tag:service --tags ${AWS_ECR_REPOSITORY}/retail-store-sample-{projectName}:${IMAGE_TAG} --configuration publish
yarn nx run-many -t helm --projects=tag:service --remote oci://${AWS_ECR_REPOSITORY} --push
bash scripts/compose-dist.sh
gh release upload ${TAG_NAME} ./dist/docker-compose/docker-compose.yaml --clobber
bash scripts/kubernetes-dist.sh
gh release upload ${TAG_NAME} ./dist/kubernetes/kubernetes.yaml --clobber
27 changes: 27 additions & 0 deletions .github/actions/setup-docker/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Setup Docker"
description: "Sets up Docker for multi-architecture builds"
runs:
using: "composite"
steps:
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Set up Docker
uses: docker/setup-docker-action@v4
with:
daemon-config: |
{
"features": {
"containerd-snapshotter": true
}
}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
outputs:
builder:
description: "Buildx builder name"
value: ${{ steps.buildx.outputs.name }}
18 changes: 18 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Setup env"
description: "Install component for devenv and nx to work"
runs:
using: "composite"
steps:
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
shell: bash
run: nix profile install nixpkgs#devenv
- name: Yarn install
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: devenv shell yarn install
55 changes: 0 additions & 55 deletions .github/dependabot.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/ci-assets.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/ci-cart.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/ci-catalog.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/ci-checkout.yml

This file was deleted.

Loading

0 comments on commit 7c73e06

Please sign in to comment.