Skip to content

Rename megaton.mdx to megathon.mdx #12

Rename megaton.mdx to megathon.mdx

Rename megaton.mdx to megathon.mdx #12

Workflow file for this run

name: Continuous integration
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Define container metadata before build
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/inje-megabrain/megabrain.kr
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Setup nodejs
uses: actions/setup-node@v2
with:
node-version: 20
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Build
run: npm run build
- name: Set up Docker Buildx (Builder instance)
uses: docker/setup-buildx-action@v2
- name: Login to Github Container Registry for Image Push
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build Image and Push
uses: docker/build-push-action@v2
with:
context: .
push: true
platform: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
kubernetes-resource-update:
name: Kubernetes resource update
runs-on: ubuntu-latest
needs: build
steps:
- name: Setup Kustomize
uses: imranismail/setup-kustomize@v1
- name: Checkout kustomize repo
uses: actions/checkout@v2
with:
repository: inje-megabrain/megabrain-infra-apps
ref: apps/megabrain-site
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Update Kubernetes resource
run: |
cd apps/megabrain-site/overlays/dev
kustomize edit set image ghcr.io/inje-megabrain/megabrain.kr:main
cat kustomization.yaml
- name: Commit and push changes
run: |
cd apps/megabrain-site
git config --global user.name puleugo
git config --global user.email [email protected]
git commit -am "Update k8s image"
git push -u origin apps/megabrain-site