Skip to content

Commit

Permalink
push image to dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
cromega committed May 4, 2020
1 parent 7e7c1ce commit f49e58b
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/test.yml → .github/workflows/docker_image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: DockerImage

on:
push:
Expand All @@ -13,13 +13,27 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v2

- name: Prepare container
run: |
apk add --no-cache openssh-keygen
chmod 600 testdata/real_id_rsa
- name: Test
run: |
export CGO_ENABLED=0
go test -v
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Docker hub login
env:
DOCKERHUB_PW: ${{ secrets.dockerhub_password }}
run: echo "$DOCKERHUB_PW" | docker login -u cromega --password-stdin

- name: Push image
run: |
docker build -t cromega/keyguard .
docker push cromega/keyguard

0 comments on commit f49e58b

Please sign in to comment.