Skip to content

fix(k8s-manifests): delete old ingress #6

fix(k8s-manifests): delete old ingress

fix(k8s-manifests): delete old ingress #6

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
# Step 1: Test the code
test:
runs-on: ubuntu-latest
environment: demo
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '14'
- name: Install Dependencies
run: echo "node dependency installation goes here" #TBA
- name: Run Tests
run: echo "node tests go here" #TBA
# Steps 2 & 3: Build and Push Docker Images
docker:
runs-on: ubuntu-latest
needs: test
environment: demo
strategy:
matrix:
component: ["backend", "frontend"]
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
# Tag with branch name and short hash
- name: Build & Push Docker Images
run: |
export IMAGE_TAG=$(git rev-parse --short HEAD)
echo "Tag is $IMAGE_TAG"
cd ${{ matrix.component }}
docker buildx build --platform "linux/amd64" -t "${DOCKER_HUB}/demo-${{ matrix.component }}:${IMAGE_TAG}" -t "${DOCKER_HUB}/demo-${{ matrix.component }}:${GITHUB_REF##*/}" -f ./Dockerfile --push .
env:
DOCKER_HUB: ${{ vars.DOCKER_HUB }}