forked from nginx-proxy/docker-gen
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
17 changed files
with
316 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,101 @@ | ||
name: DockerHub | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
- "*.*.*" | ||
paths: | ||
- '.dockerignore' | ||
- '.github/workflows/dockerhub.yml' | ||
- 'Dockerfile' | ||
- 'Dockerfile.debian' | ||
- 'go.mod' | ||
- 'go.sum' | ||
- '**.go' | ||
- ".dockerignore" | ||
- ".github/workflows/dockerhub.yml" | ||
- "Dockerfile" | ||
- "Dockerfile.debian" | ||
- "go.mod" | ||
- "go.sum" | ||
- "**.go" | ||
|
||
jobs: | ||
multiarch-build: | ||
strategy: | ||
matrix: | ||
base: [alpine, debian] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Retrieve version | ||
run: echo "GIT_DESCRIBE=$(git describe --tags)" >> $GITHUB_ENV | ||
|
||
- name: Get Docker tags for Alpine based image | ||
if: ${{ matrix.base == 'alpine' }} | ||
id: docker_meta_alpine | ||
uses: docker/metadata-action@v3 | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ secrets.DOCKER_REPO }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
labels: | | ||
org.opencontainers.image.authors=Nicolas Duchon <[email protected]> (@buchdag), Jason Wilder | ||
org.opencontainers.image.version=${{ env.GIT_DESCRIBE }} | ||
- name: Get Docker tags for Debian based image | ||
if: ${{ matrix.base == 'debian' }} | ||
id: docker_meta_debian | ||
uses: docker/metadata-action@v3 | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ secrets.DOCKER_REPO }} | ||
tags: | | ||
type=semver,suffix=-debian,pattern={{version}} | ||
type=semver,suffix=-debian,pattern={{major}}.{{minor}} | ||
type=raw,value=debian,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} | ||
type=raw,value=debian,enable={{is_default_branch}} | ||
labels: | | ||
org.opencontainers.image.authors=Nicolas Duchon <[email protected]> (@buchdag), Jason Wilder | ||
org.opencontainers.image.version=${{ env.GIT_DESCRIBE }} | ||
flavor: latest=false | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_PASS }} | ||
|
||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push the Alpine based image | ||
if: ${{ matrix.base == 'alpine' }} | ||
id: docker_build_alpine | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
build-args: DOCKER_GEN_VERSION=${{ env.GIT_DESCRIBE }} | ||
platforms: linux/amd64,linux/arm64,linux/arm/v7 | ||
push: true | ||
tags: ${{ steps.docker_meta_alpine.outputs.tags }} | ||
labels: ${{ steps.docker_meta_alpine.outputs.labels }} | ||
|
||
- name: Build and push the Debian based image | ||
if: ${{ matrix.base == 'debian' }} | ||
id: docker_build_debian | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
build-args: DOCKER_GEN_VERSION=${{ env.GIT_DESCRIBE }} | ||
|
@@ -107,7 +108,7 @@ jobs: | |
- name: Alpine based image digest | ||
if: ${{ matrix.base == 'alpine' }} | ||
run: echo ${{ steps.docker_build_alpine.outputs.digest }} | ||
|
||
- name: Debian based image digest | ||
if: ${{ matrix.base == 'debian' }} | ||
run: echo ${{ steps.docker_build_debian.outputs.digest }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,50 @@ | ||
module github.com/nginx-proxy/docker-gen | ||
|
||
go 1.18 | ||
go 1.19 | ||
|
||
require ( | ||
github.com/BurntSushi/toml v1.1.0 | ||
github.com/Masterminds/sprig/v3 v3.2.2 | ||
github.com/fsouza/go-dockerclient v1.7.10 | ||
github.com/stretchr/testify v1.7.1 | ||
github.com/BurntSushi/toml v1.2.1 | ||
github.com/Masterminds/sprig/v3 v3.2.3 | ||
github.com/fsouza/go-dockerclient v1.9.3 | ||
github.com/stretchr/testify v1.8.1 | ||
) | ||
|
||
require ( | ||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect | ||
github.com/Masterminds/goutils v1.1.1 // indirect | ||
github.com/Masterminds/semver/v3 v3.1.1 // indirect | ||
github.com/Microsoft/go-winio v0.5.2 // indirect | ||
github.com/Microsoft/hcsshim v0.9.2 // indirect | ||
github.com/containerd/cgroups v1.0.3 // indirect | ||
github.com/containerd/containerd v1.6.1 // indirect | ||
github.com/Masterminds/semver/v3 v3.2.0 // indirect | ||
github.com/Microsoft/go-winio v0.6.0 // indirect | ||
github.com/Microsoft/hcsshim v0.9.6 // indirect | ||
github.com/containerd/cgroups v1.0.4 // indirect | ||
github.com/containerd/containerd v1.6.14 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/docker/docker v20.10.12+incompatible // indirect | ||
github.com/docker/docker v20.10.23+incompatible // indirect | ||
github.com/docker/go-connections v0.4.0 // indirect | ||
github.com/docker/go-units v0.4.0 // indirect | ||
github.com/docker/go-units v0.5.0 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | ||
github.com/google/uuid v1.2.0 // indirect | ||
github.com/gorilla/mux v1.8.0 // indirect | ||
github.com/huandu/xstrings v1.3.1 // indirect | ||
github.com/huandu/xstrings v1.3.3 // indirect | ||
github.com/imdario/mergo v0.3.12 // indirect | ||
github.com/mitchellh/copystructure v1.0.0 // indirect | ||
github.com/mitchellh/reflectwalk v1.0.0 // indirect | ||
github.com/moby/sys/mount v0.2.0 // indirect | ||
github.com/moby/sys/mountinfo v0.5.0 // indirect | ||
github.com/moby/sys/mount v0.3.3 // indirect | ||
github.com/moby/sys/mountinfo v0.6.2 // indirect | ||
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect | ||
github.com/morikuni/aec v1.0.0 // indirect | ||
github.com/opencontainers/go-digest v1.0.0 // indirect | ||
github.com/opencontainers/image-spec v1.0.2 // indirect | ||
github.com/opencontainers/runc v1.1.0 // indirect | ||
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect | ||
github.com/opencontainers/runc v1.1.2 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/shopspring/decimal v1.2.0 // indirect | ||
github.com/sirupsen/logrus v1.8.1 // indirect | ||
github.com/spf13/cast v1.3.1 // indirect | ||
go.opencensus.io v0.23.0 // indirect | ||
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect | ||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect | ||
golang.org/x/crypto v0.3.0 // indirect | ||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect | ||
golang.org/x/sys v0.2.0 // indirect | ||
golang.org/x/tools v0.1.12 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Oops, something went wrong.