refactor(ci): Switch to actions
This commit is contained in:
		
							
								
								
									
										27
									
								
								.gitea/workflows/dev.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								.gitea/workflows/dev.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
name: Build latest image
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - main
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build-container:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
      - name: Login to registry
 | 
			
		||||
        uses: docker/login-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          registry: registry.odit.services
 | 
			
		||||
          username: ${{ vars.REGISTRY_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.REGISTRY_PASSWORD }}
 | 
			
		||||
      - name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v3
 | 
			
		||||
      - name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v6
 | 
			
		||||
        with:
 | 
			
		||||
          push: true
 | 
			
		||||
          tags: |
 | 
			
		||||
            ${{ vars.REGISTRY }}/lfk/kiosk:latest
 | 
			
		||||
          platforms: linux/amd64,linux/arm64
 | 
			
		||||
							
								
								
									
										27
									
								
								.gitea/workflows/release.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								.gitea/workflows/release.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
name: Build release images
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    tags:
 | 
			
		||||
      - "*.*.*"
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build-container:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
      - name: Login to registry
 | 
			
		||||
        uses: docker/login-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          registry: registry.odit.services
 | 
			
		||||
          username: ${{ vars.REGISTRY_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.REGISTRY_PASSWORD }}
 | 
			
		||||
      - name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v3
 | 
			
		||||
      - name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v6
 | 
			
		||||
        with:
 | 
			
		||||
          push: true
 | 
			
		||||
          tags: |
 | 
			
		||||
            ${{ vars.REGISTRY }}/lfk/kiosk:${{ github.ref_name }}
 | 
			
		||||
          platforms: linux/amd64,linux/arm64
 | 
			
		||||
@@ -1,40 +0,0 @@
 | 
			
		||||
steps:
 | 
			
		||||
  - name: build edge
 | 
			
		||||
    image: woodpeckerci/plugin-docker-buildx
 | 
			
		||||
    settings:
 | 
			
		||||
      repo: registry.odit.services/lfk/kiosk
 | 
			
		||||
      tags:
 | 
			
		||||
        - edge
 | 
			
		||||
      registry: registry.odit.services
 | 
			
		||||
      platforms: linux/amd64,linux/arm64
 | 
			
		||||
      cache_from: registry.odit.services/lfk/kiosk:edge
 | 
			
		||||
      username:
 | 
			
		||||
        from_secret: odit-registry-builder-username
 | 
			
		||||
      password:
 | 
			
		||||
        from_secret: odit-registry-builder-password
 | 
			
		||||
    secrets:
 | 
			
		||||
      - source: odit-npm-cache-url
 | 
			
		||||
        target: NPM_REGISTRY_URL
 | 
			
		||||
    when:
 | 
			
		||||
      branch: dev
 | 
			
		||||
  - name: build latest
 | 
			
		||||
    image: woodpeckerci/plugin-docker-buildx
 | 
			
		||||
    settings:
 | 
			
		||||
      repo: registry.odit.services/lfk/kiosk
 | 
			
		||||
      tags:
 | 
			
		||||
        - latest
 | 
			
		||||
      registry: registry.odit.services
 | 
			
		||||
      platforms: linux/amd64,linux/arm64
 | 
			
		||||
      username:
 | 
			
		||||
        from_secret: odit-registry-builder-username
 | 
			
		||||
      password:
 | 
			
		||||
        from_secret: odit-registry-builder-password
 | 
			
		||||
    secrets:
 | 
			
		||||
      - source: odit-npm-cache-url
 | 
			
		||||
        target: NPM_REGISTRY_URL
 | 
			
		||||
    when:
 | 
			
		||||
      branch: main
 | 
			
		||||
 | 
			
		||||
when:
 | 
			
		||||
  event:
 | 
			
		||||
    - push
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
steps:
 | 
			
		||||
  - name: type checks
 | 
			
		||||
    image: registry.odit.services/hub/library/node:19.9.0-alpine3.16
 | 
			
		||||
    commands:
 | 
			
		||||
      - npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
 | 
			
		||||
      - pnpm i
 | 
			
		||||
      - pnpm check
 | 
			
		||||
    secrets:
 | 
			
		||||
      - source: odit-npm-cache-url
 | 
			
		||||
        target: NPM_REGISTRY_URL
 | 
			
		||||
  - name: build check
 | 
			
		||||
    image: registry.odit.services/hub/library/node:19.9.0-alpine3.16
 | 
			
		||||
    commands:
 | 
			
		||||
      - npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
 | 
			
		||||
      - pnpm i
 | 
			
		||||
      - pnpm build
 | 
			
		||||
    secrets:
 | 
			
		||||
      - source: odit-npm-cache-url
 | 
			
		||||
        target: NPM_REGISTRY_URL
 | 
			
		||||
when:
 | 
			
		||||
  event:
 | 
			
		||||
    - pull_request
 | 
			
		||||
		Reference in New Issue
	
	Block a user