mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 05:52:55 +00:00
## Problem Pinging groups on slack didn't work, because I didn't use the correct syntax. ## Summary of changes Use the correct syntax for pinging groups.
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
name: cargo deny checks
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
build-tools-image:
|
|
required: false
|
|
type: string
|
|
schedule:
|
|
- cron: '0 10 * * *'
|
|
|
|
jobs:
|
|
cargo-deny:
|
|
strategy:
|
|
matrix:
|
|
ref: >-
|
|
${{
|
|
fromJSON(
|
|
github.event_name == 'schedule'
|
|
&& '["main","release","release-proxy","release-compute"]'
|
|
|| format('["{0}"]', github.sha)
|
|
)
|
|
}}
|
|
|
|
runs-on: [self-hosted, small]
|
|
|
|
container:
|
|
image: ${{ inputs.build-tools-image || 'neondatabase/build-tools:pinned' }}
|
|
credentials:
|
|
username: ${{ secrets.NEON_DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }}
|
|
options: --init
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ matrix.ref }}
|
|
|
|
- name: Check rust licenses/bans/advisories/sources
|
|
env:
|
|
CARGO_DENY_TARGET: >-
|
|
${{ github.event_name == 'schedule' && 'advisories' || 'all' }}
|
|
run: cargo deny check --hide-inclusion-graph $CARGO_DENY_TARGET
|
|
|
|
- name: Post to a Slack channel
|
|
if: ${{ github.event_name == 'schedule' && failure() }}
|
|
uses: slackapi/slack-github-action@v2
|
|
with:
|
|
method: chat.postMessage
|
|
token: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
payload: |
|
|
channel: ${{ vars.SLACK_ON_CALL_DEVPROD_STREAM }}
|
|
text: |
|
|
Periodic cargo-deny on ${{ matrix.ref }}: ${{ job.status }}
|
|
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub Run>
|
|
Fixing the problem should be fairly straight forward from the logs. If not, <#${{ vars.SLACK_RUST_CHANNEL_ID }}> is there to help.
|
|
Pinging <!subteam^S0838JPSH32|@oncall-devprod>.
|