Skip to content

Update cicd.yml

Update cicd.yml #11

Workflow file for this run

name: cicd-workflow with slack integration
on:
push:
branches: [ "master" ]
jobs:
job1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Docker image
run: |
docker build -t my-docker-repo .
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
env:
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/mypythonapp:${IMAGE_TAG} .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/mypythonapp:${IMAGE_TAG}