Add inherit secrets to build #TASK-7809 #144
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: Push ext-tools for develop branches | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - release-* | |
| - TASK-* | |
| tags: | |
| - '*' | |
| workflow_dispatch: | |
| jobs: | |
| check-push-ext-tools-docker-tag: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| exists: ${{ steps.check.outputs.exists }} | |
| version: ${{ steps.check.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 8 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '8' | |
| cache: 'maven' | |
| - name: Make script executable | |
| run: chmod +x .github/workflows/scripts/check_docker_tag.sh | |
| - name: Check Docker tag existence | |
| id: check | |
| env: | |
| DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USER }} | |
| DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| run: | | |
| .github/workflows/scripts/check_docker_tag.sh | |
| - uses: docker/login-action@v3 | |
| if: steps.check.outputs.exists == 'false' | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USER }} | |
| password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| logout: true | |
| - name: Deploy in Docker Hub | |
| if: steps.check.outputs.exists == 'false' | |
| run: python3 ./opencga-app/app/cloud/docker/docker-build.py push --images ext-tools --tag ${{ steps.check.outputs.version }} --org opencb |