-
Notifications
You must be signed in to change notification settings - Fork 18
45 lines (36 loc) · 1.54 KB
/
docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Docker Image CI
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: whoan/docker-build-with-cache-action@master
with:
username: "${{ secrets.DOCKER_USERNAME }}"
password: "${{ secrets.DOCKER_PASSWORD }}"
dockerfile: Docker/Dockerfile
image_name: geog0111
build_extra_args: "--target geog0111"
push_git_tag: true
push_image_and_stages: true
- name: Run test
run: |
docker run --rm -d --name test_container -p 8888:8888 "${{ secrets.DOCKER_USERNAME }}"/geog0111
docker run --link test_container:test_container waisbrot/wait
curl --fail http://localhost:8888
# - name: Login to DockerHub Registry
# run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
# - name: Get the version
# id: vars
# run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
# - name: Build the tagged Docker image
# run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/geog:${{steps.vars.outputs.tag}}
# - name: Push the tagged Docker image
# run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/geog:${{steps.vars.outputs.tag}}
# - name: Build the latest Docker image
# run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/geog:latest
# - name: Push the latest Docker image
# run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/geog:latest