Skip to content

Commit

Permalink
Add Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
usamahz committed Sep 22, 2024
1 parent 971e499 commit 139460d
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI/CD Pipeline

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

services:
docker:
image: docker:19.03.12
options: >-
--privileged
--network host
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Docker image
run: |
docker build -t transformer-image .
train:
runs-on: ubuntu-latest
needs: build # Ensure the build job completes before running this job

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Run training script
run: |
docker run --rm transformer-image python src/train.py
translate:
runs-on: ubuntu-latest
needs: build # Ensure the build job completes before running this job

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Run translation script
run: |
docker run --rm transformer-image python src/translate.py

0 comments on commit 139460d

Please sign in to comment.