-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (27 loc) · 854 Bytes
/
docker-image.yml
File metadata and controls
34 lines (27 loc) · 854 Bytes
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
name: Docker Build and Push
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ chaimabenomrane2001 }}
password: ${{ dckr_pat_KzQgqOgvAhVlW2nkBFS2-uSUPAw }}
- name: Build Docker image
run: |
docker build -t ChaimaBenOmrane/Python-To-Do-List:${{ github.sha }} .
docker tag ChaimaBenOmrane/Python-To-Do-List:${{ github.sha }} ChaimaBenOmrane/Python-To-Do-List:latest
- name: Push Docker image
run: |
docker push ChaimaBenOmrane/Python-To-Do-List:${{ github.sha }}
docker push ChaimaBenOmrane/Python-To-Do-List:latest