ci: migrate to canonical hanzoai/.github/docker-build.yml reusable (#1)
This commit is contained in:
@@ -1,48 +1,15 @@
|
||||
name: Build Container
|
||||
|
||||
name: Docker
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-deployer-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main, dev, test]
|
||||
tags: ['v*']
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
jobs:
|
||||
build-and-release:
|
||||
name: "Build"
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out Code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9.15.0
|
||||
|
||||
- name: Log in to private Docker registry
|
||||
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ secrets.REGISTRY_URL }} -u '${{ secrets.REGISTRY_USERNAME }}' --password-stdin
|
||||
|
||||
- name: Build Storybook
|
||||
run: |
|
||||
rm -Rf node_modules/
|
||||
pnpm install
|
||||
pnpm build
|
||||
pnpm build-storybook
|
||||
docker buildx build --platform linux/amd64 --push -t registry.min.dev/minio/mds .
|
||||
echo "${{ secrets.MDS_DEPLOYER_KUBECONFIG }}" > /tmp/kubecconfig
|
||||
ls -l /tmp/kubecconfig
|
||||
kubectl --kubeconfig /tmp/kubecconfig -n mds delete pod $(kubectl --kubeconfig /tmp/kubecconfig -n mds get pods | grep mds | awk '{print $1}')
|
||||
docker:
|
||||
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
|
||||
with:
|
||||
image: ghcr.io/hanzoai/mds
|
||||
secrets: inherit
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
name: Workflow Sanity
|
||||
on:
|
||||
pull_request:
|
||||
paths: ['.github/workflows/**']
|
||||
jobs:
|
||||
sanity:
|
||||
uses: hanzoai/.github/.github/workflows/workflow-sanity.yml@main
|
||||
Reference in New Issue
Block a user