diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-05 00:03:11 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-05 00:03:45 +0900 |
| commit | 3f87e9a4d522d9b2d003b9eb2bb610dc164dae08 (patch) | |
| tree | 8daa034bf2ca65982738f84ff3ece9baefa969ba /.github/workflows | |
| parent | 05a77ee41ebe35a38763ff9722357fa76d988a36 (diff) | |
| download | nilink-3f87e9a4d522d9b2d003b9eb2bb610dc164dae08.tar.gz nilink-3f87e9a4d522d9b2d003b9eb2bb610dc164dae08.tar.zst nilink-3f87e9a4d522d9b2d003b9eb2bb610dc164dae08.zip | |
add files
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build-docker.yaml | 46 | ||||
| -rw-r--r-- | .github/workflows/ci.yml | 21 |
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 ./... |
