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
4 changes: 0 additions & 4 deletions .dockerignore

This file was deleted.

3 changes: 0 additions & 3 deletions .env.example

This file was deleted.

42 changes: 26 additions & 16 deletions .github/workflows/dev.prettier.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
name: Code-Style Check
name: Build dev image

# Run only if a *.ts file has changed (i.e. anything relevant)
on:
push:
branches: [ "dev" ]
paths:
- "**.ts"
pull_request:
branches: [ "dev" ]
paths:
- "**.ts"
branches: [ "main" ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
code-style-check:
docker-image-build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Extract commit SHA
run:
echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV

- name: Checkout repository
uses: actions/checkout@v4

- name: Prettier Check
uses: creyD/prettier_action@v4.3
- name: Docker Login
uses: docker/login-action@v3
with:
dry: true
prettier_options: "--check **/*.ts"
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
run: |
docker build --pull --build-arg COM_SHA=${{ env.SHORT_SHA }} -t ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.SHORT_SHA }} .
docker push ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.SHORT_SHA }}
12 changes: 8 additions & 4 deletions .github/workflows/prod.docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker CI/CD
name: Build prod image

on:
push:
Expand All @@ -16,17 +16,21 @@ jobs:
packages: write

steps:
- name: Extract commit SHA
run:
echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Docker Login
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
run: |
docker build --pull -t ${{ env.REGISTRY }}/${{ github.repository }}:latest .
docker build --pull --build-arg COM_SHA=${{ env.SHORT_SHA }} -t ${{ env.REGISTRY }}/${{ github.repository }}:latest .
docker push ${{ env.REGISTRY }}/${{ github.repository }}:latest
22 changes: 17 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
dist
node_modules
.idea
.vscode
# Generated by Cargo
# will have compiled files and executables
debug/
target/

.env
# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
.vscode/
13 changes: 0 additions & 13 deletions .prettierignore

This file was deleted.

10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

Loading