Skip to content

feat: add server-side API proxying via nginx #5

feat: add server-side API proxying via nginx

feat: add server-side API proxying via nginx #5

Workflow file for this run

name: Release - Build and Push Image
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
pages: write
id-token: write
env:
IMAGE_REPO: ghcr.io/forkspacer/operator-ui
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Extract release tag
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "CHART_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Update Helm Chart version
run: make update-version VERSION=$VERSION
- name: Install dependencies
run: npm ci
- name: Build application
run: npm run build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.IMAGE_REPO }}:${{ env.VERSION }}
${{ env.IMAGE_REPO }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Install Helm
uses: azure/[email protected]
- name: Create charts directory
run: |
make build-charts-site
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: charts-site
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
- name: Notify forkspacer repository of new version
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.DEPENDENCY_UPDATE_TOKEN }}
repository: forkspacer/forkspacer
event-type: dependency-update
client-payload: |
{
"component": "operator-ui",
"version": "${{ env.VERSION }}",
"chart_version": "${{ env.CHART_VERSION }}"
}
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
body: |
## Docker Image
```
docker pull ${{ env.IMAGE_REPO }}:${{ env.VERSION }}
```
## Installation
See the [documentation](https://github.com/forkspacer/operator-ui#installation) for installation instructions.
draft: false
prerelease: false