diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4c2747..77b1261 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,10 +10,10 @@ jobs: - name: Checkout uses: actions/checkout@v1 - - name: Set up Go 1.13 + - name: Set up Go 1.16 uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.16 - name: Download dependencies run: go mod vendor @@ -27,7 +27,7 @@ jobs: run: bash <(curl -s https://codecov.io/bash) -f coverage.out - name: Publish - uses: jerray/publish-docker-action@v1.0.0 + uses: hartmutobendorf/publish-docker-action@v0.0.1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/Dockerfile b/Dockerfile index 59d2ba3..6484a31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.13-alpine as builder +FROM golang:1.16-alpine as builder WORKDIR /src COPY . /src diff --git a/README.md b/README.md index 676c4b6..93fd788 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Publish Docker Action +Based on https://github.com/jerray/publish-docker-action, this fixes the problem of building docker and pushing docker images, documented in https://github.com/jerray/publish-docker-action/pull/18. + [![GitHub Action](https://github.com/jerray/publish-docker-action/workflows/Main/badge.svg)](https://github.com/jerray/publish-docker-action/actions?workflow=Main) [![codecov](https://codecov.io/gh/jerray/publish-docker-action/branch/master/graph/badge.svg)](https://codecov.io/gh/jerray/publish-docker-action) [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/jerray/publish-docker-action?logo=github)](https://github.com/jerray/publish-docker-action/releases) @@ -14,7 +16,7 @@ tag and push to docker default registry (docker.io). Repository name is your Git name by default. ```yaml -- uses: jerray/publish-docker-action@master +- uses: hartmutobendorf/publish-docker-action@master with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -28,12 +30,12 @@ You can set docker registry with `registry` argument. Change docker repository n For example: ```yaml -- uses: jerray/publish-docker-action@master +- uses: hartmutobendorf/publish-docker-action@master with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} registry: docker.pkg.github.com - repository: jerray/publish-docker-action + repository: Chainstep/publish-docker-action ``` This will build and push the tag `docker.pkg.github.com/jerray/publish-docker-action:latest`. @@ -45,12 +47,12 @@ This will build and push the tag `docker.pkg.github.com/jerray/publish-docker-ac You can use static tag list by providing `tags` argument. Concat multiple tag names with commas. ```yaml -- uses: jerray/publish-docker-action@master +- uses: hartmutobendorf/publish-docker-action@master with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} registry: docker.pkg.github.com - repository: jerray/publish-docker-action + repository: Chainstep/publish-docker-action tags: latest,newest,master ``` @@ -65,12 +67,12 @@ This example builds the image, creates three tags, and pushes all of them to the Set `with.auto_tag: true` to allow action generate docker image tags automatically. ```yaml -- uses: jerray/publish-docker-action@master +- uses: hartmutobendorf/publish-docker-action@master with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} registry: docker.pkg.github.com - repository: jerray/publish-docker-action + repository: Chainstep/publish-docker-action auto_tag: true ``` @@ -98,12 +100,12 @@ Additionally, there's an output value `tag` you can use [in your next steps](htt ```yaml - id: build - uses: jerray/publish-docker-action@master + uses: hartmutobendorf/publish-docker-action@master with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} registry: docker.pkg.github.com - repository: jerray/publish-docker-action + repository: Chainstep/publish-docker-action auto_tag: true - id: deploy @@ -122,12 +124,12 @@ Provide `with.cache` argument to build from cache. Use `with.build_args` to provide docker build-time variables. Multiple variables must be separated by comma. ```yaml -- uses: jerray/publish-docker-action@master +- uses: hartmutobendorf/publish-docker-action@master with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} registry: docker.pkg.github.com - repository: jerray/publish-docker-action + repository: Chainstep/publish-docker-action build_args: HTTP_PROXY=http://127.0.0.1,USER=nginx ``` diff --git a/action.yml b/action.yml index bf683be..b1b96f1 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,6 @@ name: 'Publish Docker Action' description: 'Build, tag and publish docker image to your docker registry' -author: 'jerray' +author: 'hartmutobendorf, jerray' inputs: username: description: 'Username used to login docker registry' @@ -48,7 +48,7 @@ outputs: description: 'Tag name produced by activating the auto_tag option' runs: using: 'docker' - image: 'docker://jerray/publish-docker-action:1.0.5' + image: 'docker://hartmutobendorf/publish-docker-action:1.0.0' branding: icon: 'anchor' color: 'blue' diff --git a/go.mod b/go.mod index b32a5a1..35ea998 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ -module github.com/jerray/publish-docker-action +module github.com/Chainstep/publish-docker-action -go 1.13 +go 1.16 require github.com/caarlos0/env/v6 v6.0.0 diff --git a/helper.go b/helper.go index 0d332b8..5a6eeb6 100644 --- a/helper.go +++ b/helper.go @@ -30,7 +30,7 @@ func resolveInputs(github GitHub, inputs *Inputs) error { resolveAutoTag(typ, name, inputs) for i, t := range inputs.Tags { - inputs.Tags[i] = strings.Join([]string{inputs.Repository, t}, ":") + inputs.Tags[i] = strings.Join([]string{strings.ToLower(inputs.Repository), t}, ":") } return nil