-
Notifications
You must be signed in to change notification settings - Fork 8
40 lines (34 loc) · 1.46 KB
/
docker-image.yml
File metadata and controls
40 lines (34 loc) · 1.46 KB
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
name: Docker Image CI
on:
# release:
# types: [ published ]
push:
branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Login to DockerHub Registry
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u udopia --password-stdin
# - name: Get the version
# id: vars
# run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
- name: Build the tagged Docker GBD image
run: docker build docker/ --file docker/Dockerfile.gbd --tag udopia/gbd:${{ github.sha }}
- name: Push the tagged Docker GBD image
run: docker push udopia/gbd:${{ github.sha }}
- name: Build the latest Docker GBD image
run: docker build docker/ --file docker/Dockerfile.gbd --tag udopia/gbd:latest
- name: Push the latest Docker GBD image
run: docker push udopia/gbd:latest
- name: Build the tagged Docker NGINX image
run: docker build docker/ --file docker/Dockerfile.nginx --tag udopia/nginx:${{ github.sha }}
- name: Push the tagged Docker NGINX image
run: docker push udopia/nginx:${{ github.sha }}
- name: Build the latest Docker NGINX image
run: docker build docker/ --file docker/Dockerfile.nginx --tag udopia/nginx:latest
- name: Push the latest Docker NGINX image
run: docker push udopia/nginx:latest