This repository has been archived by the owner on Jan 27, 2025. It is now read-only.
Outside collaborators check and remove manually added collaborators #316
This file contains 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: Outside collaborators check and remove manually added collaborators | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 7 * * *" | |
env: | |
RUBY_VERSION: 3.1.0 | |
jobs: | |
outside-collaborators-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ env.RUBY_VERSION }} | |
bundler-cache: true | |
- name: Check the outside collaborators | |
run: bin/outside-collaborators.rb | |
env: | |
OPS_BOT_TOKEN: ${{ secrets.OPS_BOT_TOKEN }} | |
NOTIFY_PROD_TOKEN: ${{ secrets.NOTIFY_PROD_TOKEN }} | |
NOTIFY_TEST_TOKEN: ${{ secrets.NOTIFY_TEST_TOKEN }} | |
REALLY_POST_TO_SLACK: ${{ secrets.POST_TO_SLACK }} | |
REALLY_POST_TO_GH: ${{ secrets.POST_TO_GH }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
REALLY_SEND_TO_NOTIFY: ${{ secrets.SEND_TO_NOTIFY }} | |
LOG_LEVEL: "debug" | |
- name: Report failure to Slack | |
if: always() | |
uses: ravsamhq/notify-slack-action@v2 | |
with: | |
status: ${{ job.status }} | |
notify_when: "failure" | |
notification_title: "Failed GitHub Action Run" | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |