diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index a5ca71cd5..a74cdb8cc 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -1,5 +1,9 @@ name: Continuous Integration Workflow +permissions: + contents: read + id-token: write + on: pull_request: push: @@ -29,3 +33,17 @@ jobs: with: version: 17 distribution: corretto + + notify: + needs: + [ + Static_Analysis, + Build, + Examples, + ] + if: ${{ failure() && github.event_name == 'schedule' }} + uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main + with: + message: "Daily CI failed on `${{ github.repository }}`. View run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_CI }} diff --git a/.github/workflows/issue-notification.yml b/.github/workflows/issue-notification.yml new file mode 100644 index 000000000..4be8d1dcd --- /dev/null +++ b/.github/workflows/issue-notification.yml @@ -0,0 +1,25 @@ +name: Issue Created Notification +permissions: + contents: read +on: + issues: + types: [opened, reopened] + issue_comment: + types: [created] + +jobs: + notify-issue: + if: github.event_name == 'issues' + uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main + with: + message: "New github issue `${{ github.event.issue.title }}`. Link: ${{ github.event.issue.html_url }}" + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GHI }} + + notify-comment: + if: github.event_name == 'issue_comment' && !github.event.issue.pull_request + uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main + with: + message: "New comment on issue `${{ github.event.issue.title }}`. Link: ${{ github.event.comment.html_url }}" + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GHI }} \ No newline at end of file