mirror of
https://github.com/ysoftdevs/imagepullsecret-injector.git
synced 2026-03-21 08:39:33 +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:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: '1.15.0'
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
@@ -24,5 +19,11 @@ jobs:
|
|||||||
git config user.name "$GITHUB_ACTOR"
|
git config user.name "$GITHUB_ACTOR"
|
||||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||||
|
|
||||||
- name: make build-image
|
- name: make image
|
||||||
run: make build-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"
|
TESTARGS_DEFAULT := "-v"
|
||||||
export TESTARGS ?= $(TESTARGS_DEFAULT)
|
export TESTARGS ?= $(TESTARGS_DEFAULT)
|
||||||
DEST := $(GOPATH)/src/$(GIT_HOST)/$(BASE_DIR)
|
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)
|
LOCAL_OS := $(shell uname)
|
||||||
@@ -78,7 +78,13 @@ build-linux:
|
|||||||
# image section
|
# 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:
|
build-image:
|
||||||
@echo "Building the docker image: $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)..."
|
@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
|
WORKDIR /go/src/github.com/ysoftdevs/imagepullsecret-injector
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ version: 0.0.4
|
|||||||
# This is the version number of the application being deployed. This version number should be
|
# 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
|
# 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.
|
# 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