Skip to content

💥 feat(task): add k8s provider (#51) #11

💥 feat(task): add k8s provider (#51)

💥 feat(task): add k8s provider (#51) #11

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
release:
runs-on: ubuntu-latest
name: Release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install
- name: Build for run local
run: pnpm build:local
- name: Pack dist for run local
run: tar -czvf dist-local.tar.gz dist
- name: Build
run: |
rm -rf dist
rm -rf config/config.prod.*
pnpm build
- name: Pack dist
run: tar -czvf dist.tar.gz dist
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: dist-release
path: dist
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
dist.tar.gz
dist-local.tar.gz
prerelease: false
body: |
## Pull Image
```shell
docker pull ghcr.io/${{ github.repository }}:${{ github.ref }}
```
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=auto
tags: |
type=schedule
type=ref,event=tag
type=sha,prefix=,format=long,enable=true,priority=100
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64