Merge pull request #19 from broadinstitute/check-duplicate-filename #66
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 Taiga image | |
| on: push | |
| env: | |
| IMAGE_TAG: us.gcr.io/cds-docker-containers/taiga:ga-build-${{ github.run_number }} | |
| FINAL_IMAGE_TAG: us.gcr.io/cds-docker-containers/taiga:latest | |
| permissions: | |
| security-events: write | |
| jobs: | |
| build-docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: write SHA to file | |
| run: "bash write_version.sh ${{ github.sha }}" | |
| - name: bundle JS | |
| run: "bash bundle_js.sh" | |
| - name: Login to GCR | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: us.gcr.io | |
| username: _json_key | |
| password: ${{ secrets.DEPLOY_SVC_ACCT }} | |
| - name: Build Docker image | |
| run: bash ./build_docker.sh ${{ env.IMAGE_TAG }} | |
| - name: Run tests | |
| run: "docker run ${{ env.IMAGE_TAG }} pytest" | |
| - name: Push Docker image | |
| run: docker push ${{ env.IMAGE_TAG }} | |
| - name: Tag as latest | |
| if: github.ref == 'refs/heads/main' | |
| run: docker tag ${{ env.IMAGE_TAG }} ${{ env.FINAL_IMAGE_TAG }} | |
| - name: Push Docker image | |
| if: github.ref == 'refs/heads/main' | |
| run: docker push ${{ env.FINAL_IMAGE_TAG }} |