Skip to content

Commit

Permalink
Merge main into bottlenose (#995)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamyulong authored Sep 6, 2024
2 parents 5f7c6c7 + cf7a4fe commit b69b394
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ on:
- main
- release\/*
jobs:
phylum-analyze:
if: ${{ github.event.pull_request }}
uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/phylum-analyze.yml@main
permissions:
id-token: write
pull-requests: write
contents: read
deployments: write
secrets:
phylum_api_key: ${{ secrets.PHYLUM_API_KEY }}
with:
phylum_pr_number: ${{ github.event.number }}
phylum_pr_name: ${{ github.head_ref }}
phylum_group_name: Protocol
phylum_project_id: 3f5b2c53-46bd-4f68-b050-5898f929002f
github_repository: ${{ github.repository }}
add_report_comment_to_pull_request: true
snyk-scan-deps-licences:
name: Snyk deps/licences scan
runs-on: ubuntu-latest
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/phylum-daily-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Daily Analysis Phylum

on:
schedule:
# Runs at 14:00 UTC every day
- cron: '0 13 * * *'

env:
PHYLUM_PROJECT_ID: 3f5b2c53-46bd-4f68-b050-5898f929002f
PHYLUM_GROUP_NAME: Protocol
PHYLUM_NAME: babylon-node
jobs:
analyze_branch_phylum:
name: Analyze dependencies with Phylum
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
strategy:
matrix:
branch: [main, develop, release/babylon, release/anemone, release/bottlenose]
include:
- branch: main
- branch: develop
- branch: release/babylon
- branch: release/anemone
- branch: release/bottlenose
fail-fast: false
steps:
- uses: RDXWorks-actions/checkout@main
with:
ref: ${{ matrix.branch }}
fetch-depth: 0
- uses: RDXWorks-actions/setup-python@main
with:
python-version: 3.10.6
- name: Install Phylum
run: |
curl https://sh.phylum.io/ | sh -s -- --yes
# Add the Python user base binary directory to PATH
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Run Phylum Analysis
env:
PHYLUM_API_KEY: ${{ secrets.PHYLUM_API_KEY }}
run: |
phylum analyze --quiet --label ${{ matrix.branch }}_branch_daily_schedule > /dev/null 2>&1 || exit_code=$?
if [ $exit_code -eq 100 ]; then
echo "Phylum Analysis returned exit code 100, but continuing.";
echo "phylum_analyze_status=failure" >> $GITHUB_ENV
exit 0;
else
echo "phylum_analyze_status=success" >> $GITHUB_ENV
exit $?;
fi
- name: Analysis Status Failure notification
if: always()
uses: RDXWorks-actions/notify-slack-action@master
with:
status: ${{ env.phylum_analyze_status }}
notify_when: 'failure'
notification_title: ':clock3: Phylum Scheduled Daily Analysis:'
message_format: 'Automatic phylum analysis has found vulnerabilities on ${{ env.PHYLUM_NAME }} in ${{ matrix.branch }} branch:boom:'
footer: "Linked Repository <{repo_url}|{repo}> | <https://app.phylum.io/projects/${{ env.PHYLUM_PROJECT_ID }}?label=${{ matrix.branch }}_branch_daily_schedule&group=${{ env.PHYLUM_GROUP_NAME }}|View Report> "
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_PHYLUM_PROTOCOL_TEAM_WEBHOOK }}
1 change: 0 additions & 1 deletion docs/branching-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Once you have read the [contributing guide](../CONTRIBUTING.md), if you want to
> As of 2024-05-15, the strictly ordered list of supported base branches, starting from earliest/furthest upstream, is:
>
> * `release/bottlenose` - This is currently running on mainnet.
> * `release/anemone`
> * `main`
> * `develop`
>
Expand Down

0 comments on commit b69b394

Please sign in to comment.