Skip to content

Commit

Permalink
test build
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegGsk committed Sep 29, 2024
1 parent 251bde8 commit 9a125d7
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/prod_deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
name: Production deploy

on:
workflow_run:
workflows:
- Build and push Docker image
types:
- completed
push:
branches:
- master
- feature/convert_ci-cd_to_the_prod
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
Expand Down Expand Up @@ -44,40 +40,39 @@ jobs:
poetry run pytest
working-directory: adaptive_hockey_federation

build_and_push:
build:
needs: pytest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image for Production
uses: docker/build-push-action@v5
- name: Build and push Docker image
uses: docker/build-push-action@v5.3.0
with:
context: .
file: infra/prod/prod.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


deploy:
name: Deploy changes on server
runs-on: ubuntu-latest
needs: [pytest, build_and_push]
needs: pytest
environment:
name: prod_deploy
steps:
Expand Down

0 comments on commit 9a125d7

Please sign in to comment.