Skip to content

Commit

Permalink
build: add tests to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacioHeredia authored Dec 4, 2024
1 parent ddbeca9 commit 9f46714
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build-docker-dev.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# We first build the image without pushing, then pass some basic init tests, then push

name: Build ai4-papi:dev docker image

on: workflow_dispatch
Expand Down Expand Up @@ -28,12 +30,21 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
- name: Build
uses: docker/build-push-action@v3
with:
context: .
push: true
push: false
tags: |
${{ secrets.HARBOR_URL }}/ai4os/ai4-papi:dev
${{ secrets.DOCKERHUB_USERNAME }}/ai4-papi:dev
file: docker/Dockerfile

- name: Tests - Init ai4papi package (dev mode)
run: docker run --rm ${{ secrets.HARBOR_URL }}/ai4os/ai4-papi:dev python3 -c "unset FORWARDED_ALLOW_IPS; import ai4papi"

- name: Push to Harbor
run: docker push ${{ secrets.HARBOR_URL }}/ai4os/ai4-papi:dev

- name: Push to Docker Hub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/ai4-papi:dev

0 comments on commit 9f46714

Please sign in to comment.