Merge gitea actions release workflows
This commit is contained in:
parent
5756770b64
commit
e56bf6becf
|
@ -1,49 +0,0 @@
|
||||||
name: Backend docker image
|
|
||||||
run-name: ${{ gitea.actor }} is runs ci pipeline
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Extract tag
|
|
||||||
uses: olegtarasov/get-tag@v2.1.2
|
|
||||||
id: tagName
|
|
||||||
with:
|
|
||||||
tagRegex: "v(.*)"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."git.bhasher.com"]
|
|
||||||
http = true
|
|
||||||
insecure = true
|
|
||||||
|
|
||||||
- name: Login
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: git.bhasher.com
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push frontend
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./backend
|
|
||||||
file: ./backend/Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm64
|
|
||||||
tags: |
|
|
||||||
git.bhasher.com/bhasher/focus-backend:latest
|
|
||||||
git.bhasher.com/bhasher/focus-backend:${{ steps.tagName.outputs.tag }}
|
|
|
@ -1,49 +0,0 @@
|
||||||
name: Frontend and backend docker image
|
|
||||||
run-name: ${{ gitea.actor }} is runs ci pipeline
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Extract tag
|
|
||||||
uses: olegtarasov/get-tag@v2.1.2
|
|
||||||
id: tagName
|
|
||||||
with:
|
|
||||||
tagRegex: "v(.*)"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."git.bhasher.com"]
|
|
||||||
http = true
|
|
||||||
insecure = true
|
|
||||||
|
|
||||||
- name: Login
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: git.bhasher.com
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push frontend
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm64
|
|
||||||
tags: |
|
|
||||||
git.bhasher.com/bhasher/focus:latest
|
|
||||||
git.bhasher.com/bhasher/focus:${{ steps.tagName.outputs.tag }}
|
|
|
@ -1,56 +0,0 @@
|
||||||
name: Tauri based desktop app
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-tauri-desktop:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Extract tag
|
|
||||||
uses: olegtarasov/get-tag@v2.1.2
|
|
||||||
id: tagName
|
|
||||||
with:
|
|
||||||
tagRegex: "v(.*)"
|
|
||||||
|
|
||||||
- name: Set up node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf
|
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
|
||||||
run: |
|
|
||||||
cd frontend
|
|
||||||
npm install
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Build desktop app
|
|
||||||
run: |
|
|
||||||
cd frontend
|
|
||||||
npm run tauri build
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Publish desktop app
|
|
||||||
uses: akkuman/gitea-release-action@v1
|
|
||||||
with:
|
|
||||||
name: Focus ${{ steps.tagName.outputs.tag }}
|
|
||||||
prerelease: true
|
|
||||||
files: |-
|
|
||||||
frontend/src-tauri/target/release/focus
|
|
||||||
frontend/src-tauri/target/release/bundle/deb/*.deb
|
|
||||||
frontend/src-tauri/target/release/bundle/appimage/*.AppImage
|
|
|
@ -1,49 +0,0 @@
|
||||||
name: Frontend docker image
|
|
||||||
run-name: ${{ gitea.actor }} is runs ci pipeline
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Extract tag
|
|
||||||
uses: olegtarasov/get-tag@v2.1.2
|
|
||||||
id: tagName
|
|
||||||
with:
|
|
||||||
tagRegex: "v(.*)"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."git.bhasher.com"]
|
|
||||||
http = true
|
|
||||||
insecure = true
|
|
||||||
|
|
||||||
- name: Login
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: git.bhasher.com
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push frontend
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./frontend
|
|
||||||
file: ./frontend/Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm64
|
|
||||||
tags: |
|
|
||||||
git.bhasher.com/bhasher/focus-frontend:latest
|
|
||||||
git.bhasher.com/bhasher/focus-frontend:${{ steps.tagName.outputs.tag }}
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
name: Build releases
|
||||||
|
run-name: ${{ gitea.actor }} is runs ci pipeline
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- context: ./backend
|
||||||
|
image: focus-backend
|
||||||
|
- context: ./frontend
|
||||||
|
dockerfile: ./frontend/Dockerfile
|
||||||
|
image: focus-frontend
|
||||||
|
- context: .
|
||||||
|
image: focu
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcaches
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Extract tag
|
||||||
|
uses: olegtarasov/get-tag@v2.1.2
|
||||||
|
id: tagName
|
||||||
|
with:
|
||||||
|
tagRegex: "v(.*)"
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
config-inline: |
|
||||||
|
[registry."git.bhasher.com"]
|
||||||
|
http = true
|
||||||
|
insecure = true
|
||||||
|
|
||||||
|
- name: Login
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: git.bhasher.com
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push ${{ matrix.image }}
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ${{ matrix.context }}
|
||||||
|
file: ${{ matrix.context }}/Dockerfile
|
||||||
|
push: true
|
||||||
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
linux/arm64
|
||||||
|
tags: |
|
||||||
|
git.bhasher.com/bhasher/${{ matrix.image }}:latest
|
||||||
|
git.bhasher.com/bhasher/${{ matrix.image }}:${{ steps.tagName.outputs.tag }}
|
||||||
|
|
||||||
|
build-tauri:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Extract tag
|
||||||
|
uses: olegtarasov/get-tag@v2.1.2
|
||||||
|
id: tagName
|
||||||
|
with:
|
||||||
|
tagRegex: "v(.*)"
|
||||||
|
|
||||||
|
- name: Set up node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf
|
||||||
|
|
||||||
|
- name: Install frontend dependencies
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
npm install
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Build desktop app
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
npm run tauri build
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Publish desktop app
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
name: Focus ${{ steps.tagName.outputs.tag }}
|
||||||
|
prerelease: true
|
||||||
|
files: |-
|
||||||
|
frontend/src-tauri/target/release/focus
|
||||||
|
frontend/src-tauri/target/release/bundle/deb/*.deb
|
||||||
|
frontend/src-tauri/target/release/bundle/appimage/*.AppImage
|
Loading…
Reference in New Issue