Skip to content

Commit

Permalink
chore: run docker only after publish and version bump (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
Encord-davids authored Sep 5, 2023
1 parent 33a98df commit f353383
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 44 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/docker.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,41 @@ jobs:
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
docker:
needs: [publish]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/encord-active
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/encord-active:latest
cache-to: type=inline

0 comments on commit f353383

Please sign in to comment.