diff --git a/.github/workflows/docker-hub.yaml b/.github/workflows/docker-hub.yaml new file mode 100644 index 00000000..98ea8b45 --- /dev/null +++ b/.github/workflows/docker-hub.yaml @@ -0,0 +1,40 @@ +name: Docker Hub + +# Currently, we publish every commit to main into Docker hub. +# In the future, we may to trigger off of actual releases. +on: + pull_request: +# push: +# branches: +# - main + +jobs: + push_to_docker_hub: + name: Build and push image + runs-on: ubuntu-latest + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Get Docker metadata + id: meta + uses: docker/metadata-action@v4 + with: + flavor: latest=true + images: smartonfhir/cumulus-etl + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push image to Docker Hub + uses: docker/build-push-action@v4 + with: + push: true + platforms: | + linux/amd64 + linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/compose.yaml b/compose.yaml index 5e9c1238..9da451ed 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,9 +1,7 @@ services: cumulus-etl-base: - build: - context: . - target: cumulus-etl + image: smartonfhir/cumulus-etl:latest environment: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY