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
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
name: Build Docker Image
name: Build Application

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
- push

jobs:
image-build:
build:
runs-on: ubuntu-latest

steps:
Expand All @@ -25,5 +22,5 @@ jobs:
- name: Generate code
run: make gen

- name: Build Docker image
run: make image-build
- name: Build application
run: make build
43 changes: 22 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
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'
- uses: actions/checkout@v6

- 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: Install dependencies
run: yarn install

- name: Generate code
run: make gen

- name: Build application
run: make build
- name: Build image
uses: docker/build-push-action@v6
with:
context: .
push: false
49 changes: 49 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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: 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:
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
7 changes: 2 additions & 5 deletions .github/workflows/lint.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Format and lint
name: Static checks & tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
- push

jobs:
lint:
Expand Down