This commit is contained in:
30
.gitea/workflows/gitea-bp.yaml
Normal file
30
.gitea/workflows/gitea-bp.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: Build and Push Docker Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: gitea.paddington.fi
|
||||||
|
username: make
|
||||||
|
password: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build and push image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: make/birdspotter:latest
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
#
|
|
||||||
# .gitea/gitea-ci.yaml
|
|
||||||
#
|
|
||||||
|
|
||||||
name: Build And Test
|
|
||||||
run-name: ${{ gitea.actor }} is runs ci pipeline
|
|
||||||
on: [ push ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: https://github.com/actions/checkout@v4
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: https://github.com/actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '20.20'
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm run lint
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run build
|
|
||||||
env:
|
|
||||||
NODE_OPTIONS: --max_old_space_size=4096
|
|
||||||
|
|
||||||
publish:
|
|
||||||
runs-on: cth-ubuntu-latest
|
|
||||||
needs: build
|
|
||||||
if: gitea.ref == 'refs/heads/main'
|
|
||||||
steps:
|
|
||||||
- uses: https://github.com/actions/checkout@v4
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: https://github.com/docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."gitea.paddington.fi"]
|
|
||||||
http = true
|
|
||||||
insecure = true
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: https://github.com/docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: "gitea.paddington.fi/make/birdspotter:${{gitea.sha}},gitea.paddington.fi/make/birdspotter:latest"
|
|
||||||
Reference in New Issue
Block a user