Skip to content

Commit

Permalink
Merge pull request #31 from kloudlite/ci/testing
Browse files Browse the repository at this point in the history
CI testing
  • Loading branch information
nxtCoder19 authored Dec 19, 2023
2 parents e2b8692 + 54335b2 commit 880abb3
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions web/.github/workflows/build-container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: build-docker-images

on:
push:
branches:
- release*
paths:
- "lib/**/**"
- "src/**"

permissions:
contents: read
packages: write

jobs:
docker-builds:
strategy:
matrix:
app:
- auth
- console
- devdoc
- website
runs-on: ubuntu-latest
name: Deploy to Docker Image
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Install UPX
run: |
curl -L0 https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-amd64_linux.tar.xz > upx.tar.xz
tar -xf upx.tar.xz
sudo mv upx-4.2.1-amd64_linux/upx /usr/local/bin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
if: startsWith(github.ref, 'refs/heads/release')
run: |
branch_name=${GITHUB_REF#refs/heads/}
version_string="v${branch_name#release-}-nightly"
docker build --build-arg APP=${{matrix.app}} . -t ghcr.io/kloudlite/platform/web/${{matrix.app}}:$version_string --push
docker build --build-arg APP=${{matrix.app}} . -t ghcr.io/kloudlite/platform/web/${{matrix.app}}:commit-${GITHUB_SHA} --push

0 comments on commit 880abb3

Please sign in to comment.