diff --git a/.github/workflows/dockerize.yaml b/.github/workflows/dockerize.yaml index fa9eec02f..da4eec4d1 100644 --- a/.github/workflows/dockerize.yaml +++ b/.github/workflows/dockerize.yaml @@ -2,6 +2,7 @@ name: Build and push Docker images on: push: + branches: 'dockerize' tags: '@openfn/ws-worker@**' jobs: @@ -9,6 +10,13 @@ jobs: name: Push Docker image to Docker Hub runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: name/app - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -18,9 +26,15 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Log tags from meta step + run: | + echo ${{ steps.meta.outputs.tags }} - name: Build and push uses: docker/build-push-action@v5 with: - push: true + context: . + push: ${{ github.event_name != 'pull_request' }} target: ws-worker - tags: openfn/ws-worker:latest + tags: | + type=semver,pattern=openfn/ws-worker:{{raw}} + labels: ${{ steps.meta.outputs.labels }}