forked from lvthillo/python-flask-docker
-
Notifications
You must be signed in to change notification settings - Fork 8
26 lines (21 loc) · 804 Bytes
/
docker-image.yml
File metadata and controls
26 lines (21 loc) · 804 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
name: Docker Image CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag lidorlg/lidor-python-flask:$(date +%F)-${{ github.run_number }}
- name: docker login
run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASS }}
- name: docker push
run: |
docker push lidorlg/lidor-python-flask:$(date +%F)-${{ github.run_number }}
docker tag lidorlg/lidor-python-flask:$(date +%F)-${{ github.run_number }} lidorlg/lidor-python-flask:latest
docker push lidorlg/lidor-python-flask:latest
echo "the variable is: ${{ vars.COURSE }}"