feature/build (#1)
Co-authored-by: Tobias Klemp <tobias.klemp@v-office.com> Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
137
.gitea/workflows/ci.yml
Normal file
137
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,137 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, develop]
|
||||
pull_request:
|
||||
branches: [main, develop]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '22.x'
|
||||
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: 1.3.4
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun ci
|
||||
|
||||
- name: Build app
|
||||
run: bun --bun run build
|
||||
|
||||
- name: Run type checking
|
||||
run: bun --bun run check
|
||||
|
||||
- name: Run linting
|
||||
run: bun --bun run lint:check
|
||||
|
||||
- name: Check formatting
|
||||
run: bun --bun run format:check
|
||||
|
||||
# build-docker-image:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Set up Docker Build
|
||||
# uses: docker/setup-buildx-action@v3
|
||||
|
||||
# - name: Log in to registry
|
||||
# uses: docker/login-action@v3
|
||||
# with:
|
||||
# registry: ${{ vars.INSTANCE_URL }}
|
||||
# username: ${{ github.actor }}
|
||||
# password: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||
|
||||
# - name: Build and push image
|
||||
# uses: docker/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# tags: ${{ vars.INSTANCE_URL }}/tech-reborn/phoenix:${{ github.sha }}
|
||||
|
||||
# type-check:
|
||||
# runs-on: ubuntu-latest
|
||||
# container:
|
||||
# image: oven/bun:alpine
|
||||
# needs: install-dependencies
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
|
||||
# - name: Download node_modules artifact
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: node_modules
|
||||
# path: node_modules
|
||||
|
||||
# - name: Run type checking
|
||||
# run: bun run check
|
||||
|
||||
# lint:
|
||||
# runs-on: ubuntu-latest
|
||||
# container:
|
||||
# image: oven/bun:alpine
|
||||
# needs: install-dependencies
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
|
||||
# - name: Download node_modules artifact
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: node_modules
|
||||
# path: node_modules
|
||||
|
||||
# - name: Run linting
|
||||
# run: bun run lint:check
|
||||
|
||||
# format-check:
|
||||
# runs-on: ubuntu-latest
|
||||
# container:
|
||||
# image: oven/bun:alpine
|
||||
# needs: install-dependencies
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
|
||||
# - name: Download node_modules artifact
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: node_modules
|
||||
# path: node_modules
|
||||
|
||||
# - name: Check formatting
|
||||
# run: bun run format:check
|
||||
|
||||
# build:
|
||||
# runs-on: ubuntu-latest
|
||||
# container:
|
||||
# image: oven/bun:alpine
|
||||
# needs: install-dependencies
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
|
||||
# - name: Download node_modules artifact
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: node_modules
|
||||
# path: node_modules
|
||||
|
||||
# - name: Build application
|
||||
# run: bun run build
|
||||
|
||||
# - name: Upload build artifacts
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: build-output
|
||||
# path: build/
|
||||
# retention-days: 7
|
||||
31
.gitea/workflows/commentDeploy.yml
Normal file
31
.gitea/workflows/commentDeploy.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: ChatOps Deploy
|
||||
on: issue_comment
|
||||
|
||||
jobs:
|
||||
testing:
|
||||
# if: |
|
||||
# github.event.issue.pull_request &&
|
||||
# startsWith(github.event.comment.body, '/deploy') &&
|
||||
# (github.event.comment.author_association == 'OWNER' ||
|
||||
# github.event.comment.author_association == 'MEMBER')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get tag safe branch name
|
||||
id: branch_name
|
||||
uses: ./.github/actions/getTagSafeRef
|
||||
|
||||
- name: Print branch_name
|
||||
run: ${{ steps.branch_name.outputs.branch_name }}
|
||||
|
||||
# - name: Build and push image
|
||||
# id: docker_build
|
||||
# uses: ./.github/actions/buildDockerImage
|
||||
# with:
|
||||
# tag: ${{ steps.branch_name.outputs.branch_name }}
|
||||
|
||||
# - name: Deploy application
|
||||
# uses: ./.github/actions/deploy
|
||||
# with:
|
||||
# project_name: ${{ steps.branch_name.outputs.branch_name }}
|
||||
# url: '${{ steps.branch_name.outputs.branch_name }}.phoenix.klemp.local'
|
||||
# image_url: ${{ steps.docker_build.outputs.image_url }}
|
||||
Reference in New Issue
Block a user