mirror of
https://github.com/caprover/caprover
synced 2026-10-16 18:09:12 +00:00
69 lines
2.1 KiB
YAML
69 lines
2.1 KiB
YAML
name: Build and push the edge image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
concurrency:
|
|
group: edge-publish
|
|
queue: max
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
run-pre-checks:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 24
|
|
- run: |
|
|
sudo bash -c "mkdir /captain && chown -R `whoami` /captain"
|
|
npm ci
|
|
npm run build
|
|
npm run lint
|
|
npm run formatter
|
|
npm run test
|
|
prepare-frontend:
|
|
needs: run-pre-checks
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build edge frontend
|
|
shell: bash
|
|
run: ./release/build-and-push.sh edge frontend
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: edge-frontend
|
|
path: dist-frontend
|
|
if-no-files-found: error
|
|
retention-days: 1
|
|
build-publish-docker-hub:
|
|
needs: prepare-frontend
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: edge-frontend
|
|
path: dist-frontend
|
|
- name: Prepare multi-platform builder
|
|
shell: bash
|
|
run: ./release/build-and-push.sh edge docker-setup
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build and Push Edge to DockerHub
|
|
shell: bash
|
|
run: ./release/build-and-push.sh edge publish
|
|
- name: Clean up old edge commit tags
|
|
shell: bash
|
|
env:
|
|
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
|
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
|
run: bash ./release/cleanup-edge-tags.sh
|