aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-05 00:03:11 +0900
committernsfisis <nsfisis@gmail.com>2026-02-05 00:03:45 +0900
commit3f87e9a4d522d9b2d003b9eb2bb610dc164dae08 (patch)
tree8daa034bf2ca65982738f84ff3ece9baefa969ba /.github
parent05a77ee41ebe35a38763ff9722357fa76d988a36 (diff)
downloadnilink-3f87e9a4d522d9b2d003b9eb2bb610dc164dae08.tar.gz
nilink-3f87e9a4d522d9b2d003b9eb2bb610dc164dae08.tar.zst
nilink-3f87e9a4d522d9b2d003b9eb2bb610dc164dae08.zip
add files
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-docker.yaml46
-rw-r--r--.github/workflows/ci.yml21
2 files changed, 67 insertions, 0 deletions
diff --git a/.github/workflows/build-docker.yaml b/.github/workflows/build-docker.yaml
new file mode 100644
index 0000000..e18bdf3
--- /dev/null
+++ b/.github/workflows/build-docker.yaml
@@ -0,0 +1,46 @@
+name: Build and Push Docker Image
+
+on:
+ push:
+ tags:
+ - 'v*'
+
+jobs:
+ build-and-push:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ packages: write
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Log in to GitHub Container Registry
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Extract metadata
+ id: meta
+ uses: docker/metadata-action@v5
+ with:
+ images: ghcr.io/${{ github.repository }}
+ tags: |
+ type=ref,event=branch
+ type=ref,event=pr
+ type=semver,pattern={{version}}
+ type=semver,pattern={{major}}.{{minor}}
+
+ - name: Build and push
+ uses: docker/build-push-action@v5
+ with:
+ context: .
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..4b26086
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,21 @@
+name: CI
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-go@v5
+ with:
+ go-version: "1.24"
+ cache-dependency-path: go.sum
+
+ - run: go vet ./...
+ - run: go test ./...