Skip to content

New CICD workflow

New CICD workflow #5

Workflow file for this run

name: API CI/CD Dev Branch
on:
push:
branches:
- '*'
- '!main'
jobs:
build-and-test:
name: Build/Test
uses: ./.github/workflows/CI-build-test.yml
build-and-push-dev-docker-image:
name: Build/Push Staging Docker Image
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build/Push dev api
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/api:${{ github.ref_name }}
notify-slack:
name: Notify Slack
needs: build-and-push-dev-docker-image
uses: ./.github/workflows/CI-notify-slack.yml