|
47 | 47 | -Psigning.keyId=4FB80B8E \ |
48 | 48 | -PsonatypeUsername=${{ secrets.SONATYPE_USER }} \ |
49 | 49 | -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }} |
| 50 | + - name: Push Docker Image to DockerHub |
| 51 | + if: startsWith(github.ref, 'refs/tags/v') |
| 52 | + run: | |
| 53 | + ./gradlew :agent:pushOciImage :agent:pushLegacyOciImage |
| 54 | + ./gradlew :agent:pushOciImage :agent:pushLegacyOciImage -PociImageTag=latest |
| 55 | + env: |
| 56 | + ORG_GRADLE_PROJECT_dockerHubUsername: ${{ secrets.DOCKERHUB_USER }} |
| 57 | + ORG_GRADLE_PROJECT_dockerHubPassword: ${{ secrets.DOCKERHUB_TOKEN }} |
50 | 58 | - name: Upload coverage to Teamscale |
51 | 59 | if: always() && github.event_name == 'push' |
52 | 60 | uses: cqse/teamscale-upload-action@v9.2.1 |
|
84 | 92 | message: 'Coverage Windows' |
85 | 93 | files: '**/jacocoTestReport.xml' |
86 | 94 |
|
87 | | - docker: |
88 | | - runs-on: ubuntu-latest |
89 | | - steps: |
90 | | - - name: Set up QEMU |
91 | | - uses: docker/setup-qemu-action@v4 |
92 | | - - name: Set up Docker Buildx |
93 | | - uses: docker/setup-buildx-action@v4 |
94 | | - - name: Docker meta |
95 | | - id: meta |
96 | | - uses: docker/metadata-action@v6 |
97 | | - with: |
98 | | - images: cqse/teamscale-jacoco-agent |
99 | | - - name: Login to DockerHub |
100 | | - if: github.event_name != 'pull_request' |
101 | | - uses: docker/login-action@v4 |
102 | | - with: |
103 | | - username: ${{ secrets.DOCKERHUB_USER }} |
104 | | - password: ${{ secrets.DOCKERHUB_TOKEN }} |
105 | | - - name: Build and push |
106 | | - uses: docker/build-push-action@v7 |
107 | | - with: |
108 | | - file: 'agent/src/docker/Dockerfile' |
109 | | - platforms: linux/amd64,linux/arm64 |
110 | | - push: ${{ startsWith(github.ref, 'refs/tags/v') }} |
111 | | - tags: ${{ steps.meta.outputs.tags }} |
112 | | - labels: ${{ steps.meta.outputs.labels }} |
113 | | - build-args: | |
114 | | - GITHUB_REF=${{ github.ref }} |
115 | 95 |
|
0 commit comments