mirror of
https://github.com/jimeh/casecmp.git
synced 2026-02-19 02:16:40 +00:00
Merge pull request #12 from jimeh/maintenance
This commit is contained in:
44
.github/workflows/ci.yml
vendored
44
.github/workflows/ci.yml
vendored
@@ -8,9 +8,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: "1.20"
|
||||
- name: Install dependencies
|
||||
run: go mod download
|
||||
- name: Build binary
|
||||
@@ -27,46 +27,54 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: azure/setup-helm@v3
|
||||
with:
|
||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Lint chart
|
||||
run: helm lint chart
|
||||
- name: Template chart
|
||||
run: helm template chart
|
||||
|
||||
release-please:
|
||||
name: Release Please
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, helm-lint]
|
||||
if: github.ref == 'refs/heads/main'
|
||||
outputs:
|
||||
release_created: ${{ steps.release-please.outputs.release_created }}
|
||||
tag_name: ${{ steps.release-please.outputs.tag_name }} # e.g. v1.0.0
|
||||
version: ${{ steps.release-please.outputs.version }} # e.g. 1.0.0
|
||||
all: ${{ toJSON(steps.release-please.outputs) }}
|
||||
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
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, helm-lint, release-please]
|
||||
if: needs.release-please.outputs.release_created
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- if: ${{ steps.release-please.outputs.release_created }}
|
||||
name: Set up QEMU
|
||||
- run: git fetch --force --tags
|
||||
- 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/setup-buildx-action@v2
|
||||
- name: Docker Login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- if: ${{ steps.release-please.outputs.release_created }}
|
||||
uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
- if: ${{ steps.release-please.outputs.release_created }}
|
||||
name: Run GoReleaser
|
||||
go-version: "1.20"
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE: ${{ github.repository }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -47,8 +47,8 @@ changelog:
|
||||
|
||||
dockers:
|
||||
- image_templates:
|
||||
- "ghcr.io/jimeh/casecmp:{{ .Version }}-amd64"
|
||||
- "ghcr.io/jimeh/casecmp:latest-amd64"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-amd64"
|
||||
dockerfile: Dockerfile
|
||||
use: buildx
|
||||
goos: linux
|
||||
@@ -56,8 +56,8 @@ dockers:
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64"
|
||||
- image_templates:
|
||||
- "ghcr.io/jimeh/casecmp:{{ .Version }}-386"
|
||||
- "ghcr.io/jimeh/casecmp:latest-386"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-386"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-386"
|
||||
dockerfile: Dockerfile
|
||||
use: buildx
|
||||
goos: linux
|
||||
@@ -65,8 +65,8 @@ dockers:
|
||||
build_flag_templates:
|
||||
- "--platform=linux/386"
|
||||
- image_templates:
|
||||
- "ghcr.io/jimeh/casecmp:{{ .Version }}-arm64"
|
||||
- "ghcr.io/jimeh/casecmp:latest-arm64"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-arm64"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-arm64"
|
||||
use: buildx
|
||||
goos: linux
|
||||
goarch: arm64
|
||||
@@ -74,8 +74,8 @@ dockers:
|
||||
build_flag_templates:
|
||||
- "--platform=linux/arm64"
|
||||
- image_templates:
|
||||
- "ghcr.io/jimeh/casecmp:{{ .Version }}-armv6"
|
||||
- "ghcr.io/jimeh/casecmp:latest-armv6"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv6"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv6"
|
||||
use: buildx
|
||||
goos: linux
|
||||
goarch: arm
|
||||
@@ -84,8 +84,8 @@ dockers:
|
||||
build_flag_templates:
|
||||
- "--platform=linux/arm/v6"
|
||||
- image_templates:
|
||||
- "ghcr.io/jimeh/casecmp:{{ .Version }}-armv7"
|
||||
- "ghcr.io/jimeh/casecmp:latest-armv7"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv7"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv7"
|
||||
use: buildx
|
||||
goos: linux
|
||||
goarch: arm
|
||||
@@ -95,17 +95,17 @@ dockers:
|
||||
- "--platform=linux/arm/v7"
|
||||
|
||||
docker_manifests:
|
||||
- name_template: ghcr.io/jimeh/casecmp:{{ .Version }}
|
||||
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}"
|
||||
image_templates:
|
||||
- ghcr.io/jimeh/casecmp:{{ .Version }}-amd64
|
||||
- ghcr.io/jimeh/casecmp:{{ .Version }}-386
|
||||
- ghcr.io/jimeh/casecmp:{{ .Version }}-arm64
|
||||
- ghcr.io/jimeh/casecmp:{{ .Version }}-armv6
|
||||
- ghcr.io/jimeh/casecmp:{{ .Version }}-armv7
|
||||
- name_template: ghcr.io/jimeh/casecmp:latest
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-386"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-arm64"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv6"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv7"
|
||||
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
|
||||
image_templates:
|
||||
- ghcr.io/jimeh/casecmp:latest-amd64
|
||||
- ghcr.io/jimeh/casecmp:latest-386
|
||||
- ghcr.io/jimeh/casecmp:latest-arm64
|
||||
- ghcr.io/jimeh/casecmp:latest-armv6
|
||||
- ghcr.io/jimeh/casecmp:latest-armv7
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-amd64"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-386"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-arm64"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv6"
|
||||
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv7"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"release-type": "go",
|
||||
"bump-minor-pre-major": true,
|
||||
"bump-patch-for-minor-pre-major": true,
|
||||
"packages": {
|
||||
".": {
|
||||
"release-type": "go",
|
||||
"changelog-path": "CHANGELOG.md",
|
||||
"bump-minor-pre-major": true,
|
||||
"bump-patch-for-minor-pre-major": true,
|
||||
"draft": false,
|
||||
"prerelease": false,
|
||||
"extra-files": [
|
||||
@@ -13,4 +13,4 @@
|
||||
}
|
||||
},
|
||||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user