Merge pull request #5 from underworldcode/joss-submission #5
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: Image Build and Push to DockerHub | ||
| # gh action to build and push container of uw3 to dockerhub | ||
| # only runs on the 'development' branch for now. | ||
| # In future: run on 'main'/release, or any PR for testing. | ||
| on: | ||
| workflow_run: | ||
| workflow:[test_uw3] | ||
| types: [completed] | ||
| branches:[development] | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Exact branch name | ||
| run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.XXX_USERNAME }} | ||
| password: ${{ secrets.XXX_PWORD }} | ||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| push: true | ||
| file: ./Dockerfile | ||
| platforms: linux/amd64 | ||
| # see https://github.com/docker/build-push-action/issues/276 for syntax help | ||
| tags: underworldcode/underworld3:${{ env.BRANCH }} | ||
| #-$(date +%s) | ||