Merge pull request #37299 from dimagi/create-pull-request/update-tran… #574
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Test Docker Image | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| if: ${{ github.secret_source == 'Actions' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Get Python version | |
| id: vars | |
| # produces a variable like python=py3.13 | |
| run: echo "python=py$(cat .python-version)" >> $GITHUB_OUTPUT | |
| - name: Docker login | |
| uses: docker/login-action@v3 | |
| with: | |
| username: dimagi | |
| password: ${{ secrets.DOCKERHUB_RW_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push image to Docker Hub | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| tags: dimagi/commcarehq-${{ steps.vars.outputs.python }} | |
| push: true |