Skip to content

CI devops - Image

CI devops - Image #31

Workflow file for this run

name: CI devops - Image
on:
workflow_run:
workflows: 'CI devops - Test Backend'
branches: main
types: completed
jobs:
build-and-push-docker-image:
runs-on: ubuntu-22.04
#if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Login to DockerHub
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image and push backend
uses: docker/[email protected]
with:
context: ./TP1/backend
tags: ${{secrets.DOCKERHUB_USERNAME}}/tp-devops-backend:1.0
push: ${{ github.ref == 'refs/heads/main' }}
- name: Build image and push database
uses: docker/[email protected]
with:
context: ./TP1/database
tags: ${{secrets.DOCKERHUB_USERNAME}}/tp-devops-database:1.0
push: ${{ github.ref == 'refs/heads/main' }}
- name: Build image and push proxy
uses: docker/[email protected]
with:
context: ./TP3/proxy
tags: ${{secrets.DOCKERHUB_USERNAME}}/tp-devops-httpd:1.1
push: ${{ github.ref == 'refs/heads/main' }}
- name: Build image and push front
uses: docker/[email protected]
with:
context: ./TP3/front
tags: ${{secrets.DOCKERHUB_USERNAME}}/tp-devops-frontend:1.0
push: ${{ github.ref == 'refs/heads/main' }}