Skip to content

fix(deps): remove package-lock.json #804

fix(deps): remove package-lock.json

fix(deps): remove package-lock.json #804

Workflow file for this run

name: Build and Push
on:
push:
branches:
- main
release:
types:
- published
pull_request:
types:
- opened
- reopened
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
build:
uses: ./.github/workflows/base.yml
with:
job-type: build
lint:
uses: ./.github/workflows/base.yml
with:
job-type: lint
build-docker:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: read
packages: write
services:
clickhouse:
image: ghcr.io/duyet/docker-images:clickhouse_24.6
ports:
- 8123:8123
- 9000:9000
options: >-
--health-cmd "wget --no-verbose --tries=1 --spider http://localhost:8123/?query=SELECT%201 || exit 1"
--health-interval 30s
--health-timeout 10s
--health-retries 5
--health-start-period 30s
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
network=host
- name: Log in to the Container registry
uses: docker/login-action@7ca345011ac4304463197fac0e56eab1bc7e6af0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@bd26c982ee2b6c0f9744591c74c527e8a669f72f
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=
type=schedule,pattern={{date 'YYYYMMDD'}}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
allow: network.host,security.insecure
network: host
platforms: linux/amd64
build-args: |
GITHUB_REF=$GITHUB_REF
GITHUB_SHA=$GITHUB_SHA
outputs:
tags: ${{ steps.meta.outputs.tags }}
first_tag: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
validate-docker-build:
runs-on: ubuntu-latest
needs: build-docker
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') }}
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: read
packages: write
services:
clickhouse:
image: ghcr.io/duyet/docker-images:clickhouse_testing
ports:
- 8123:8123
- 9000:9000
options: >-
--health-cmd "wget --no-verbose --tries=1 --spider http://localhost:8123/?query=SELECT%201 || exit 1"
--health-interval 30s
--health-timeout 10s
--health-retries 5
--health-start-period 30s
test-image:
image: ${{ needs.build-docker.outputs.first_tag }}
env:
CLICKHOUSE_HOST: http://clickhouse:8123
CLICKHOST_USER: default
CLICKHOST_PASS: ''
ports:
- 3000:3000
steps:
- name: Test image
run: |
curl -sSf http://localhost:3000/healthz || exit 1
curl -sSf http://localhost:3000/api/version || exit 1