|
| 1 | +name: Build and Publish Docker Images |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - '202[2-9].[0-9]+.[0-9]+' |
| 7 | + - '202[2-9].[0-9]+-pc[0-9]+' |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - "develop" |
| 11 | + types: [ closed ] |
| 12 | + workflow_dispatch: |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v3 |
| 19 | + - name: Set docker image tag to 'develop' |
| 20 | + if: github.ref == 'refs/heads/develop' |
| 21 | + run: echo "DOCKER_TAG=develop" >> $GITHUB_ENV |
| 22 | + - name: Set docker image tag to git tag |
| 23 | + if: startsWith(github.ref, 'refs/tags/') |
| 24 | + run: echo "DOCKER_TAG=${{ github.ref_name }}" >> $GITHUB_ENV |
| 25 | + - name: Login to Docker Hub |
| 26 | + uses: docker/login-action@v3 |
| 27 | + with: |
| 28 | + username: ${{ secrets.DOCKER_HUB_USERNAME }} |
| 29 | + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} |
| 30 | + - name: Set up Docker Buildx |
| 31 | + uses: docker/setup-buildx-action@v3 |
| 32 | + - name: Build and push core |
| 33 | + uses: docker/build-push-action@v6 |
| 34 | + with: |
| 35 | + context: ./ |
| 36 | + file: ./docker/pipeline/bag3d-core.dockerfile |
| 37 | + builder: ${{ steps.buildx.outputs.name }} |
| 38 | + build-args: | |
| 39 | + JOBS=2 |
| 40 | + VERSION=${{ env.DOCKER_TAG }} |
| 41 | + push: true |
| 42 | + tags: 3dgi/3dbag-pipeline-core:${{ env.DOCKER_TAG }} |
| 43 | + - name: Build and push floors estimation |
| 44 | + uses: docker/build-push-action@v6 |
| 45 | + with: |
| 46 | + context: ./ |
| 47 | + file: ./docker/pipeline/bag3d-floors-estimation.dockerfile |
| 48 | + builder: ${{ steps.buildx.outputs.name }} |
| 49 | + build-args: | |
| 50 | + JOBS=2 |
| 51 | + VERSION=${{ env.DOCKER_TAG }} |
| 52 | + push: true |
| 53 | + tags: 3dgi/3dbag-pipeline-floors-estimation:${{ env.DOCKER_TAG }} |
| 54 | + - name: Build and push party walls |
| 55 | + uses: docker/build-push-action@v6 |
| 56 | + with: |
| 57 | + context: ./ |
| 58 | + file: ./docker/pipeline/bag3d-party-walls.dockerfile |
| 59 | + builder: ${{ steps.buildx.outputs.name }} |
| 60 | + build-args: | |
| 61 | + JOBS=2 |
| 62 | + VERSION=${{ env.DOCKER_TAG }} |
| 63 | + push: true |
| 64 | + tags: 3dgi/3dbag-pipeline-party-walls:${{ env.DOCKER_TAG }} |
| 65 | + - name: Build and push dagster |
| 66 | + uses: docker/build-push-action@v6 |
| 67 | + with: |
| 68 | + context: ./docker/dagster |
| 69 | + file: ./docker/dagster/Dockerfile |
| 70 | + builder: ${{ steps.buildx.outputs.name }} |
| 71 | + build-args: | |
| 72 | + JOBS=2 |
| 73 | + VERSION=${{ env.DOCKER_TAG }} |
| 74 | + push: true |
| 75 | + tags: 3dgi/3dbag-pipeline-dagster:${{ env.DOCKER_TAG }} |
0 commit comments