mirror of
https://github.com/jimeh/casecmp.git
synced 2026-02-18 18:06:39 +00:00
Remove the kingpin external dependency, and instead just use Go's stdlib flag package. BREAKING CHANGE: Long versions of command line flags are no longer supported.
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
---
|
|
name: CI
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
name: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
- name: Install dependencies
|
|
run: go mod download
|
|
- name: Build binary
|
|
run: make
|
|
- name: Run and make request
|
|
run: |
|
|
./bin/casecmp -p 8080 &
|
|
curl --silent --retry 10 --retry-delay 1 --retry-connrefused \
|
|
http://localhost:8080/
|
|
|
|
helm-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: azure/setup-helm@v3
|
|
with:
|
|
token: "${{ secrets.GITHUB_TOKEN }}"
|
|
- name: Lint chart
|
|
run: helm lint chart
|
|
- name: Template chart
|
|
run: helm template chart
|
|
|
|
release-please:
|
|
runs-on: ubuntu-latest
|
|
needs: [build, helm-lint]
|
|
if: github.ref == 'refs/heads/main'
|
|
steps:
|
|
- uses: google-github-actions/release-please-action@v3
|
|
id: release-please
|
|
with:
|
|
command: manifest
|
|
- if: ${{ steps.release-please.outputs.release_created }}
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- if: ${{ steps.release-please.outputs.release_created }}
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- if: ${{ steps.release-please.outputs.release_created }}
|
|
uses: docker/setup-buildx-action@v2
|
|
- if: ${{ steps.release-please.outputs.release_created }}
|
|
name: Docker Login
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- if: ${{ steps.release-please.outputs.release_created }}
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
- if: ${{ steps.release-please.outputs.release_created }}
|
|
name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|