Skip to content

Commit

Permalink
Add docker image for ks (#75)
Browse files Browse the repository at this point in the history
* Add docker image for ks

* Bump upx to 3.96
  • Loading branch information
LinuxSuRen committed Mar 9, 2021
1 parent 68364c6 commit 3c49c2c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,29 @@ jobs:
uses: actions/[email protected]
with:
go-version: 1.13.x
- name: Upgrade upx
run: |
# try to fix https://github.com/jenkins-zh/jenkins-cli/issues/493
wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
tar xvf upx-3.96-amd64_linux.tar.xz
upx-3.96-amd64_linux/upx -V
sudo mv upx-3.96-amd64_linux/upx $(which upx)
rm -rf upx-3.96-amd64_linux
rm -rf xvf upx-3.96-amd64_linux.tar.xz
upx -V
- name: Run GoReleaser
uses: goreleaser/[email protected]
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }}
- name: Build image
run: |
ver=$(git describe --tags)
docker login --username ${{ secrets.DOCKER_HUB_USER }} --password ${{secrets.DOCKER_HUB_TOKEN}}
docker build ./build -t surenpi/ks:${ver}
docker push surenpi/ks:${ver}
docker tag surenpi/ks:${ver} surenpi/ks:latest
docker push surenpi/ks:latest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea/
bin/

build/ks
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ copy-plugin: build-plugin

goreleaser-test:
goreleaser release --rm-dist --skip-publish --snapshot

image: build-linux
cp bin/ks build/ks
docker build ./build -t surenpi/ks
3 changes: 3 additions & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM kubespheredev/kubectl:v1.17.0

COPY ks /usr/local/bin

0 comments on commit 3c49c2c

Please sign in to comment.