Skip to content

Commit b903466

Browse files
committed
chore: add github actions
1 parent e1d4e48 commit b903466

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed

.github/workflows/docker.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: docker
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
- name: Docker meta
15+
id: meta
16+
uses: docker/metadata-action@v5
17+
with:
18+
images: |
19+
rook1e404/fusion
20+
tags: |
21+
type=semver,pattern={{version}}
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v3
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
- name: Login to Docker Hub
27+
uses: docker/login-action@v3
28+
with:
29+
username: ${{ secrets.DOCKERHUB_USERNAME }}
30+
password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
- name: Build and push
32+
uses: docker/build-push-action@v5
33+
with:
34+
context: .
35+
platforms: linux/amd64,linux/arm64
36+
push: true
37+
tags: ${{ steps.meta.outputs.tags }}

.github/workflows/release.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- name: Set up Go
18+
uses: actions/setup-go@v4
19+
with:
20+
go-version: "1.22"
21+
- name: Set up Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 21
25+
- name: Build
26+
run: ./script.sh build
27+
- name: Release
28+
uses: softprops/action-gh-release@v1
29+
with:
30+
draft: true
31+
files: |
32+
build/*

.github/workflows/test.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: test
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
goreleaser:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Set up Go
13+
uses: actions/setup-go@v4
14+
with:
15+
go-version: "1.22"
16+
- name: Test
17+
run: ./script.sh test

0 commit comments

Comments
 (0)