Deploy Toolkit #82
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: Deploy Toolkit | |
| on: | |
| workflow_run: | |
| workflows: [DataPrivacyToolkit-Toolkit] | |
| types: | |
| - completed | |
| branches: [main] | |
| jobs: | |
| build_and_deploy: | |
| name: Build and Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'adopt' | |
| java-version: '11' | |
| cache: 'gradle' | |
| - name: Run gradlew publish to maven local | |
| working-directory: ./library | |
| run: ./gradlew publishToMavenLocal --no-daemon | |
| - name: Run gradlew to build toolkit | |
| working-directory: ./docker | |
| run: ./gradlew shadowJar -x test --no-daemon | |
| - name: Build image | |
| working-directory: ./docker | |
| run: docker build -t cli:${{ github.sha }} . | |
| - name: Tag image | |
| run: docker tag cli:${{ github.sha }} cli:latest | |
| - name: Push To quay.io | |
| id: push-to-quay | |
| uses: redhat-actions/push-to-registry@v2 | |
| with: | |
| image: cli | |
| tags: latest ${{ github.sha }} | |
| registry: quay.io/data_privacy_toolkit | |
| username: ${{ secrets.QUAYIO_USER }} | |
| password: ${{ secrets.QUAYIO_PASSWORD }} | |
| - name: Print image url | |
| run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" | |