-
Notifications
You must be signed in to change notification settings - Fork 57
chore(CI): Fix daily CI #832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,16 @@ | ||
| # This workflow runs every weekday at 15:00 UTC (8AM PDT) | ||
| name: Daily CI | ||
|
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "00 15 * * 1-5" | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull_request: | ||
| paths: | ||
| .github/workflows/daily_ci.yml | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think in In GitHub Actions, paths should be a YAML list. Right now it’s a scalar string. Change to: - .github/workflows/daily_ci.yml |
||
|
|
||
| jobs: | ||
| codebuild: | ||
|
|
@@ -18,7 +22,7 @@ jobs: | |
| [ | ||
| codebuild, | ||
| ] | ||
| if: ${{ failure() }} | ||
| 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 }}" | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not part of this commit the file call: proof_ci.yaml (yaml) other workflows are .yml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ on: | |
|
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. permissions: jobs: |
||
|
|
||
| jobs: | ||
| clang-format: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to scope permissions per job (principle of least privilege):
permissions:
contents: read
jobs:
codebuild:
permissions:
id-token: write
contents: read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better suggestion: jobs:
codebuild:
if: github.event_name == 'pull_request' || github.repository_owner == 'aws'
permissions:
contents: read
id-token: write
uses: ./.github/workflows/codebuild.yml
secrets: inherit