Skip to content

Commit

Permalink
Fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
RealHinome authored Aug 24, 2024
1 parent 97f9a6c commit 3146c5c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ name: news/docker

on:
workflow_run:
workflows: ["news/graphql", "news/machine_learning", "codeql"]
types:
- completed

workflows: ["news/graphql"]
types: ["completed"]

env:
REGISTRY: ghcr.io

jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'master' }}
name: Publish news
runs-on: ubuntu-latest
permissions: write-all
Expand All @@ -32,7 +30,7 @@ jobs:
echo PKG_VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' graphql/Cargo.toml) >> $GITHUB_OUTPUT
- name: Build GraphQL image
run: |
docker build . -f docker/api/Dockerfile -t ghcr.io/gravitalia/news-api:latest .
docker build . -f docker/api/Dockerfile -t ghcr.io/gravitalia/news-api:latest
docker push ghcr.io/lubmminy/polymath:latest
docker tag ghcr.io/gravitalia/news-graphql:latest ghcr.io/gravitalia/news-api:${{ steps.get-graphql-tag.outputs.PKG_VERSION }}
docker push ghcr.io/lubmminy/polymath:${{ steps.get-graphql-tag.outputs.PKG_VERSION }}
Expand All @@ -43,7 +41,7 @@ jobs:
echo PKG_VERSION=$(awk -F ' = ' '/^version/ { gsub(/["]/, "", $2); print $2 }' machine_learning/pyproject.toml) >> $GITHUB_OUTPUT
- name: Build ML API image
run: |
docker build . -f docker/ml/Dockerfile -t ghcr.io/gravitalia/news-ml:latest .
docker build . -f docker/ml/Dockerfile -t ghcr.io/gravitalia/news-ml:latest
docker tag ghcr.io/gravitalia/news-ml:latest ghcr.io/gravitalia/news-ml:${{ steps.get-ml-tag.outputs.PKG_VERSION }}
- name: Publish images
run: |
Expand Down

0 comments on commit 3146c5c

Please sign in to comment.