Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
f3f1750527 | |||
30767b10c5 | |||
c6b17b0ee6 | |||
227c61f841 | |||
27a158b32e | |||
e597367368 | |||
bda49f6a9b | |||
3b2f295be2 | |||
098845bccd | |||
0f526f05ab |
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
GO_VERSION: 1.19
|
GO_VERSION: 1.19
|
||||||
GOLANGCI_LINT_VERSION: v1.49.0
|
GOLANGCI_LINT_VERSION: v1.50.0
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -32,7 +32,7 @@ jobs:
|
|||||||
|
|
||||||
# https://github.com/marketplace/actions/cache
|
# https://github.com/marketplace/actions/cache
|
||||||
- name: Cache Go modules
|
- name: Cache Go modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
2
.github/workflows/go-cross.yml
vendored
2
.github/workflows/go-cross.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
|||||||
|
|
||||||
# https://github.com/marketplace/actions/cache
|
# https://github.com/marketplace/actions/cache
|
||||||
- name: Cache Go modules
|
- name: Cache Go modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
# In order:
|
# In order:
|
||||||
# * Module download cache
|
# * Module download cache
|
||||||
|
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
@ -10,7 +10,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
GO_VERSION: 1.19
|
GO_VERSION: 1.19
|
||||||
SEIHON_VERSION: v0.9.0
|
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -27,12 +26,21 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Docker Login
|
- name: dockerhub-login
|
||||||
env:
|
uses: docker/login-action@v1
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
with:
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
run: |
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
|
|
||||||
|
- name: ghcr-login
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: traefiker
|
||||||
|
password: ${{ secrets.GHCR_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
@ -39,14 +39,33 @@ docker_manifests:
|
|||||||
image_templates:
|
image_templates:
|
||||||
- 'traefik/whoami:{{ .Tag }}-amd64'
|
- 'traefik/whoami:{{ .Tag }}-amd64'
|
||||||
- 'traefik/whoami:{{ .Tag }}-arm64'
|
- 'traefik/whoami:{{ .Tag }}-arm64'
|
||||||
|
- 'traefik/whoami:{{ .Tag }}-armv7'
|
||||||
- name_template: 'traefik/whoami:latest'
|
- name_template: 'traefik/whoami:latest'
|
||||||
image_templates:
|
image_templates:
|
||||||
- 'traefik/whoami:{{ .Tag }}-amd64'
|
- 'traefik/whoami:{{ .Tag }}-amd64'
|
||||||
- 'traefik/whoami:{{ .Tag }}-arm64'
|
- 'traefik/whoami:{{ .Tag }}-arm64'
|
||||||
|
- 'traefik/whoami:{{ .Tag }}-armv7'
|
||||||
- name_template: 'traefik/whoami:v{{ .Major }}.{{ .Minor }}'
|
- name_template: 'traefik/whoami:v{{ .Major }}.{{ .Minor }}'
|
||||||
image_templates:
|
image_templates:
|
||||||
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
|
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
|
||||||
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
|
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
|
||||||
|
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'
|
||||||
|
|
||||||
|
- name_template: 'ghcr.io/traefik/whoami:{{ .Tag }}'
|
||||||
|
image_templates:
|
||||||
|
- 'ghcr.io/traefik/whoami:{{ .Tag }}-amd64'
|
||||||
|
- 'ghcr.io/traefik/whoami:{{ .Tag }}-arm64'
|
||||||
|
- 'ghcr.io/traefik/whoami:{{ .Tag }}-armv7'
|
||||||
|
- name_template: 'ghcr.io/traefik/whoami:latest'
|
||||||
|
image_templates:
|
||||||
|
- 'ghcr.io/traefik/whoami:{{ .Tag }}-amd64'
|
||||||
|
- 'ghcr.io/traefik/whoami:{{ .Tag }}-arm64'
|
||||||
|
- 'ghcr.io/traefik/whoami:{{ .Tag }}-armv7'
|
||||||
|
- name_template: 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}'
|
||||||
|
image_templates:
|
||||||
|
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
|
||||||
|
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
|
||||||
|
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'
|
||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
- use: buildx
|
- use: buildx
|
||||||
@ -57,12 +76,21 @@ dockers:
|
|||||||
- 'traefik/whoami:latest-amd64'
|
- 'traefik/whoami:latest-amd64'
|
||||||
- 'traefik/whoami:{{ .Tag }}-amd64'
|
- 'traefik/whoami:{{ .Tag }}-amd64'
|
||||||
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
|
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
|
||||||
|
- 'ghcr.io/traefik/whoami:latest-amd64'
|
||||||
|
- 'ghcr.io/traefik/whoami:{{ .Tag }}-amd64'
|
||||||
|
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- '--pull'
|
- '--pull'
|
||||||
- '--label=org.opencontainers.image.created={{.Date}}'
|
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
|
||||||
- '--label=org.opencontainers.image.title={{.ProjectName}}'
|
- '--label=org.opencontainers.image.title={{.ProjectName}}'
|
||||||
|
- '--label=org.opencontainers.image.description=Tiny Go webserver that prints OS information and HTTP request to output'
|
||||||
|
- '--label=org.opencontainers.image.source={{.GitURL}}'
|
||||||
|
- '--label=org.opencontainers.image.url={{.GitURL}}'
|
||||||
|
- '--label=org.opencontainers.image.documentation={{.GitURL}}'
|
||||||
|
- '--label=org.opencontainers.image.created={{.Date}}'
|
||||||
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
|
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
|
||||||
- '--label=org.opencontainers.image.version={{.Version}}'
|
- '--label=org.opencontainers.image.version={{.Version}}'
|
||||||
|
- '--platform=linux/amd64'
|
||||||
|
|
||||||
- use: buildx
|
- use: buildx
|
||||||
goos: linux
|
goos: linux
|
||||||
@ -72,10 +100,43 @@ dockers:
|
|||||||
- 'traefik/whoami:latest-arm64'
|
- 'traefik/whoami:latest-arm64'
|
||||||
- 'traefik/whoami:{{ .Tag }}-arm64'
|
- 'traefik/whoami:{{ .Tag }}-arm64'
|
||||||
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
|
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
|
||||||
|
- 'ghcr.io/traefik/whoami:latest-arm64'
|
||||||
|
- 'ghcr.io/traefik/whoami:{{ .Tag }}-arm64'
|
||||||
|
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- '--pull'
|
- '--pull'
|
||||||
- '--label=org.opencontainers.image.created={{.Date}}'
|
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
|
||||||
- '--label=org.opencontainers.image.title={{.ProjectName}}'
|
- '--label=org.opencontainers.image.title={{.ProjectName}}'
|
||||||
|
- '--label=org.opencontainers.image.description=Tiny Go webserver that prints OS information and HTTP request to output'
|
||||||
|
- '--label=org.opencontainers.image.source={{.GitURL}}'
|
||||||
|
- '--label=org.opencontainers.image.url={{.GitURL}}'
|
||||||
|
- '--label=org.opencontainers.image.documentation={{.GitURL}}'
|
||||||
|
- '--label=org.opencontainers.image.created={{.Date}}'
|
||||||
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
|
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
|
||||||
- '--label=org.opencontainers.image.version={{.Version}}'
|
- '--label=org.opencontainers.image.version={{.Version}}'
|
||||||
|
- '--platform=linux/arm64'
|
||||||
|
|
||||||
|
- use: buildx
|
||||||
|
goos: linux
|
||||||
|
goarch: arm
|
||||||
|
goarm: '7'
|
||||||
|
dockerfile: buildx.Dockerfile
|
||||||
|
image_templates:
|
||||||
|
- 'traefik/whoami:latest-armv7'
|
||||||
|
- 'traefik/whoami:{{ .Tag }}-armv7'
|
||||||
|
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'
|
||||||
|
- 'ghcr.io/traefik/whoami:latest-armv7'
|
||||||
|
- 'ghcr.io/traefik/whoami:{{ .Tag }}-armv7'
|
||||||
|
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'
|
||||||
|
build_flag_templates:
|
||||||
|
- '--pull'
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
|
||||||
|
- '--label=org.opencontainers.image.title={{.ProjectName}}'
|
||||||
|
- '--label=org.opencontainers.image.description=Tiny Go webserver that prints OS information and HTTP request to output'
|
||||||
|
- '--label=org.opencontainers.image.source={{.GitURL}}'
|
||||||
|
- '--label=org.opencontainers.image.url={{.GitURL}}'
|
||||||
|
- '--label=org.opencontainers.image.documentation={{.GitURL}}'
|
||||||
|
- '--label=org.opencontainers.image.created={{.Date}}'
|
||||||
|
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
|
||||||
|
- '--label=org.opencontainers.image.version={{.Version}}'
|
||||||
|
- '--platform=linux/arm/v7'
|
||||||
|
7
Makefile
7
Makefile
@ -1,6 +1,4 @@
|
|||||||
.PHONY: default check test build image publish-images
|
.PHONY: default check test build image
|
||||||
|
|
||||||
TAG_NAME := $(shell git tag -l --contains HEAD)
|
|
||||||
|
|
||||||
IMAGE_NAME := traefik/whoami
|
IMAGE_NAME := traefik/whoami
|
||||||
|
|
||||||
@ -17,6 +15,3 @@ check:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
docker build -t $(IMAGE_NAME) .
|
docker build -t $(IMAGE_NAME) .
|
||||||
|
|
||||||
publish-images:
|
|
||||||
seihon publish -v "$(TAG_NAME)" -v "latest" --image-name $(IMAGE_NAME) --dry-run=false
|
|
||||||
|
@ -104,6 +104,6 @@ services:
|
|||||||
image: traefik/whoami
|
image: traefik/whoami
|
||||||
command:
|
command:
|
||||||
# It tells whoami to start listening on 2001 instead of 80
|
# It tells whoami to start listening on 2001 instead of 80
|
||||||
- --port 2001
|
- --port=2001
|
||||||
- --name iamfoo
|
- --name=iamfoo
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user