mirror of
https://github.com/ysoftdevs/imagepullsecret-injector.git
synced 2026-01-11 22:41:15 +01:00
Setup release of docker images to dockerhub
This commit is contained in:
15
.github/workflows/release-docker.yaml
vendored
15
.github/workflows/release-docker.yaml
vendored
@@ -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
|
||||
- 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
|
||||
10
Makefile
10
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)..."
|
||||
|
||||
@@ -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 . .
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user