Skip to content

fix(ci): Build UI on CI #15

fix(ci): Build UI on CI

fix(ci): Build UI on CI #15

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
concurrency:
group: ${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GO111MODULE: "on"
CGO_ENABLED: "0"
GOTOOLCHAIN: auto # fix Go toolchain version mismatch
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Setup task
uses: arduino/setup-task@v1
- name: Build frontend
run: task ui:build --force
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
only-new-issues: true
skip-pkg-cache: true
snapshot:
name: Build snapshot Docker image
runs-on: ubuntu-latest
needs: [ lint]
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Install ko
uses: imjasonh/[email protected]
- name: Setup task
uses: arduino/setup-task@v1
- name: Build frontend
run: task ui:build --force
- name: Build and push snapshot Docker image
env:
KO_DOCKER_REPO: ghcr.io/skynewz/gh-stars-search-engine
run: |
ko build \
--bare \
--platform=linux/amd64,linux/arm64 \
--preserve-import-paths=false \
--sbom=none