Skip to content

Commit

Permalink
Update ci-pipeline.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmylong1 authored Jan 21, 2024
1 parent 56cea15 commit 7a172fe
Showing 1 changed file with 5 additions and 33 deletions.
38 changes: 5 additions & 33 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,20 @@ jobs:
build:
runs-on: ubuntu-latest

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

- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install pipx
pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
run: poetry install

- name: Test with Pytest
run: poetry run pytest

- name: Lint with flake8
run: poetry run flake8

docker:
runs-on: ubuntu-latest
needs: build

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

- name: Set up Docker
uses: docker/setup-buildx-action@v1
python-version: '3.x' # Specify your desired Python version

- name: Build Docker Image
run: |
docker buildx create --use
docker buildx build -t emmylong1/devops-interview:v1 .
docker build -t emmylong1/devops-interview:v1 .
env:
DOCKER_CLI_AGGREGATE: 1
DOCKER_BUILDKIT: 1 # Enable Docker BuildKit for improved build performance

- name: Push to Docker Hub
run: |
Expand Down

0 comments on commit 7a172fe

Please sign in to comment.