Don't try to run inappropriate CI on forked repositories (#871)

This commit is contained in:
Daniel Tobias 2022-06-29 17:11:42 +10:00 committed by GitHub
parent c6d9fd7a10
commit a330b78632
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 19 deletions

View File

@ -34,11 +34,17 @@ jobs:
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
run: platformio run -e teensy35 -e teensy36 -e teensy41 -e black_F407VE -e megaatmega2561 -e megaatmega2560
- name: Build test atmel
run: platformio run -e megaatmega2560 -e megaatmega2561
- name: Build test teensy
run: platformio run -e teensy35 -e teensy36 -e teensy41
- name: Build test STM32
run: platformio run -e black_F407VE -e BlackPill_F401CC -e BlackPill_F411CE_USB
- name: Upload to Speeduino server
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.repository_owner == 'noisymime'
env:
WEB_PWD: ${{ secrets.WEB_PWD }}
run: |
@ -51,7 +57,7 @@ jobs:
- name: Slack Notification (Passed)
uses: rtCamp/action-slack-notify@v2
if: success() && github.event_name != 'pull_request'
if: success() && github.event_name != 'pull_request' && github.repository_owner == 'noisymime'
env:
SLACK_CHANNEL: git
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
@ -63,7 +69,7 @@ jobs:
- name: Slack Notification (Failed)
uses: rtCamp/action-slack-notify@v2
if: failure() && github.event_name != 'pull_request'
if: failure() && github.event_name != 'pull_request' && github.repository_owner == 'noisymime'
env:
SLACK_CHANNEL: git
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'

View File

@ -1,6 +1,4 @@
# This is a basic workflow to help you get started with Actions
name: Doxygen Action
name: Build and update Doxygen documentation
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
@ -8,8 +6,6 @@ on:
push:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
@ -22,21 +18,20 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Doxygen Action
uses: mattnotmitt/doxygen-action@v1.1.0
- name: Build Doxygen documentation
uses: mattnotmitt/doxygen-action@v1.9
with:
# Path to Doxyfile
doxyfile-path: "./Doxyfile" # default is ./Doxyfile
# Working directory
working-directory: "." # default is .
- name: Setup git config
if: github.repository_owner == 'noisymime'
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "<>"
- name: Commit Doxygen HTML
if: github.event_name != 'pull_request'
- name: Commit updated Doxygen documentation
if: github.event_name != 'pull_request' && github.repository_owner == 'noisymime'
env:
GH_DOXYGEN: ${{ secrets.GH_DOXYGEN }}
run: |

View File

@ -1,5 +1,3 @@
# This is a basic workflow to help you get started with Actions
name: Unit Tests
# Controls when the workflow will run
@ -13,6 +11,8 @@ on:
jobs:
build:
# Only try to run hardware unit tests on the upstream repository
if: github.repository_owner == 'noisymime'
runs-on: ubuntu-latest
@ -67,4 +67,4 @@ jobs:
SLACK_TITLE: 'Unit tests FAILED :warning:'
SLACK_USERNAME: Github
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
MSG_MINIMAL: actions url,commit
MSG_MINIMAL: actions url,commit