From 36d94103b2e0103db14d8872150e96ae3f7289af Mon Sep 17 00:00:00 2001 From: kraysent Date: Sun, 22 Feb 2026 10:21:34 +0000 Subject: [PATCH 1/3] add release workflow --- .github/workflows/release.yaml | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..c3e4a54 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,38 @@ +name: Release image + +on: + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v6 + + - name: Set up Docker runtime + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set image name + run: echo "IMAGE_NAME=ghcr.io/hyperleda/hyperleda-webapp" >> $GITHUB_ENV + + - name: Set short SHA + run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + ${{ env.IMAGE_NAME }}:${{ env.SHORT_SHA }} + ${{ env.IMAGE_NAME }}:latest From a9726b147b044b50ad9b523e737fa5945b3a44b3 Mon Sep 17 00:00:00 2001 From: kraysent Date: Sun, 22 Feb 2026 10:35:53 +0000 Subject: [PATCH 2/3] unify gh workflows with backend --- .github/workflows/{lint.yml => build-app.yml} | 8 ++--- .github/workflows/build.yml | 34 +++++++------------ .../workflows/{image-build.yml => tests.yml} | 13 +++---- 3 files changed, 21 insertions(+), 34 deletions(-) rename .github/workflows/{lint.yml => build-app.yml} (83%) rename .github/workflows/{image-build.yml => tests.yml} (67%) diff --git a/.github/workflows/lint.yml b/.github/workflows/build-app.yml similarity index 83% rename from .github/workflows/lint.yml rename to .github/workflows/build-app.yml index d9aecc0..ec607f5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/build-app.yml @@ -1,4 +1,4 @@ -name: Format and lint +name: Build Application on: push: @@ -7,7 +7,7 @@ on: branches: [ main ] jobs: - lint: + build: runs-on: ubuntu-latest steps: @@ -25,5 +25,5 @@ jobs: - name: Generate code run: make gen - - name: Run check - run: make check + - name: Build application + run: make build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec607f5..5a2eb9c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,29 +1,19 @@ -name: Build Application +name: Build image on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + - push jobs: build: runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Install dependencies - run: yarn install - - - name: Generate code - run: make gen - - - name: Build application - run: make build + - uses: actions/checkout@v6 + + - name: Set up Docker runtime + uses: docker/setup-buildx-action@v3 + + - name: Build image + uses: docker/build-push-action@v6 + with: + context: . + push: false diff --git a/.github/workflows/image-build.yml b/.github/workflows/tests.yml similarity index 67% rename from .github/workflows/image-build.yml rename to .github/workflows/tests.yml index 1fec96f..f9599a5 100644 --- a/.github/workflows/image-build.yml +++ b/.github/workflows/tests.yml @@ -1,13 +1,10 @@ -name: Build Docker Image +name: Static checks & tests on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + - push jobs: - image-build: + lint: runs-on: ubuntu-latest steps: @@ -25,5 +22,5 @@ jobs: - name: Generate code run: make gen - - name: Build Docker image - run: make image-build + - name: Run check + run: make check From 7e82d6f6138715222dea9fcbd3f184323f844c80 Mon Sep 17 00:00:00 2001 From: kraysent Date: Sun, 22 Feb 2026 10:38:15 +0000 Subject: [PATCH 3/3] add codegen --- .github/workflows/build-app.yml | 5 +---- .github/workflows/build.yml | 11 +++++++++++ .github/workflows/release.yaml | 11 +++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-app.yml b/.github/workflows/build-app.yml index ec607f5..8e9060a 100644 --- a/.github/workflows/build-app.yml +++ b/.github/workflows/build-app.yml @@ -1,10 +1,7 @@ name: Build Application on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + - push jobs: build: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a2eb9c..82b6058 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,17 @@ jobs: - name: Set up Docker runtime uses: docker/setup-buildx-action@v3 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: yarn install + + - name: Generate code + run: make gen + - name: Build image uses: docker/build-push-action@v6 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c3e4a54..bd31064 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,6 +15,17 @@ jobs: - name: Set up Docker runtime uses: docker/setup-buildx-action@v3 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: yarn install + + - name: Generate code + run: make gen + - name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: