diff --git a/.github/workflows/release-docker.yaml b/.github/workflows/release-docker.yaml index 31b7132..e8a54f4 100644 --- a/.github/workflows/release-docker.yaml +++ b/.github/workflows/release-docker.yaml @@ -9,11 +9,6 @@ jobs: release: runs-on: ubuntu-latest steps: - - name: Setup Go - uses: actions/setup-go@v2 - with: - go-version: '1.15.0' - - name: Checkout uses: actions/checkout@v1 with: @@ -24,5 +19,11 @@ jobs: git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - name: make build-image - run: make build-image \ No newline at end of file + - name: make image + run: make image + env: + DOCKER_USER: '${{ secrets.DOCKER_USER }}' + DOCKER_TOKEN: '${{ secrets.DOCKER_TOKEN }}' + + - name: make docker-logout + run: make docker-logout \ No newline at end of file diff --git a/Makefile b/Makefile index adea93a..2bea7db 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ export GOPATH ?= $(GOPATH_DEFAULT) TESTARGS_DEFAULT := "-v" export TESTARGS ?= $(TESTARGS_DEFAULT) DEST := $(GOPATH)/src/$(GIT_HOST)/$(BASE_DIR) -IMAGE_TAG ?= $(shell cat "$(REPO_ROOT)/VERSION")-$(shell git describe --match=$(git rev-parse --short=8 HEAD) --tags --always --dirty) +IMAGE_TAG ?= $(shell cat "$(REPO_ROOT)/VERSION") LOCAL_OS := $(shell uname) @@ -78,7 +78,13 @@ build-linux: # image section ############################################################ -image: build-image push-image +image: docker-login build-image push-image + +docker-login: + @echo ${DOCKER_TOKEN} | docker login -u ${DOCKER_USER} --password-stdin + +docker-logout: + @docker logout build-image: @echo "Building the docker image: $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)..." diff --git a/VERSION b/VERSION index 95e94cd..04eddb2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.0.1 \ No newline at end of file +v0.0.7 \ No newline at end of file diff --git a/build/Dockerfile b/build/Dockerfile index 5c41b06..29a788f 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.14 AS builder +FROM golang:1.15 AS builder WORKDIR /go/src/github.com/ysoftdevs/imagepullsecret-injector COPY . . diff --git a/helm/imagepullsecret-injector/Chart.yaml b/helm/imagepullsecret-injector/Chart.yaml index bc349fd..f19f286 100644 --- a/helm/imagepullsecret-injector/Chart.yaml +++ b/helm/imagepullsecret-injector/Chart.yaml @@ -20,4 +20,4 @@ version: 0.0.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: v0.0.1 +appVersion: v0.0.7