-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (31 loc) · 1.14 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
name: Docker Image CI
on:
push:
branches: [ "main" ]
jobs:
build-login-publish:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build image
run: docker build -t elimuinformatics/a2d2:latest .
- name: tag image with version id
run: docker image tag elimuinformatics/a2d2:latest elimuinformatics/a2d2:1.0.2
- name: push latest image
run: docker push elimuinformatics/a2d2:latest
- name: push image with Version id
run: docker push elimuinformatics/a2d2:1.0.2
- name: push README to Dockerhub
uses: peter-evans/dockerhub-description@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: elimuinformatics/a2d2
readme-filepath: Dockerhub-README.md