mirror of
https://github.com/jimeh/dotkatapult.git
synced 2026-02-19 11:16:39 +00:00
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
---
|
|
name: CI
|
|
on: [push]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.18
|
|
- name: Install dependencies
|
|
run: go mod download
|
|
- name: Build binary
|
|
run: make
|
|
- name: Run and make request
|
|
run: |
|
|
./bin/dotkatapult --port=8080 &
|
|
curl --silent --retry 10 --retry-delay 1 --retry-connrefused \
|
|
http://localhost:8080/
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: [test]
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
- uses: docker/setup-buildx-action@v1
|
|
- name: Docker Login
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.18
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|