Skip to content

Auto-Fork

Auto-Fork #1015

Workflow file for this run

# Copyright 2021 The Knative Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Auto-Fork
on:
schedule:
- cron: '0 10 * * 1-5' # 3am Pacific on weekdays
workflow_dispatch:
permissions:
contents: read
jobs:
forky:
name: Auto-Fork
runs-on: ubuntu-latest
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
org:
- knative-extensions
- knative
steps:
- uses: knative/actions/setup-go@main
- name: Install Dependencies
run: go install knative.dev/toolbox/buoy@main
- name: Install gh
run: |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt-get update
sudo apt-get install gh -qqy
- name: Check out code onto GOPATH
uses: actions/checkout@v4
- name: Check Repo
run: GITHUB_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }} ./hack/auto-fork.sh ${{ matrix.org }}
- name: Post failure notice to Slack
uses: rtCamp/[email protected]
if: ${{ failure() }}
env:
SLACK_ICON: http://github.com/knative-automation.png?size=48
SLACK_USERNAME: knative-automation
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: 'knative-productivity'
SLACK_COLOR: '#8E1600'
MSG_MINIMAL: 'true'
SLACK_TITLE: Auto-fork ${{ matrix.org }} failed.
SLACK_MESSAGE: |
For detailed logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}