Deploy Snapshot to common SAP Artifactory #353
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 Snapshot to common SAP Artifactory | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: 0 20 * * 1-5 | |
| jobs: | |
| deploy-snapshot: | |
| name: "Deploy Snapshot" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: "Checkout Repository" | |
| uses: actions/checkout@v6 | |
| - name: "Setup java" | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "sapmachine" | |
| java-version: "17" | |
| server-id: artifactory-snapshots | |
| server-username: DEPLOYMENT_USER | |
| server-password: DEPLOYMENT_PASS | |
| - name: "Publish Snapshot" | |
| run: > | |
| mvn | |
| --batch-mode | |
| --no-transfer-progress | |
| --threads 1C | |
| --show-version | |
| -DrepositoryId=artifactory-snapshots | |
| -Dmaven.compiler.showCompilationChanges | |
| -Dhttp.keepAlive=false | |
| clean package deploy | |
| env: | |
| DEPLOYMENT_USER: ${{ secrets.ARTIFACTORY_COMMON_USER }} | |
| DEPLOYMENT_PASS: ${{ secrets.ARTIFACTORY_COMMON_PASSWORD }} | |
| - name: "Slack Notification" | |
| if: failure() | |
| uses: slackapi/[email protected] | |
| with: | |
| webhook: ${{ secrets.SLACK_WEBHOOK }} | |
| webhook-type: incoming-webhook | |
| payload: | | |
| { | |
| "text": "⚠️ Snapshot Deployment failed! 😬 Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-java/actions/runs/${{ github.run_id }}|here>" | |
| } |