Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't run workflow steps that require secrets on forks #3089

Merged
merged 1 commit into from
Jun 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ jobs:
run: xvfb-run ./build test+only --configuration=${{ matrix.configuration }} --where="Category!=FlakyNetwork"

- name: Send Discord Notification
if: failure()
env:
JOB_STATUS: ${{ job.status }}
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
if: ${{ env.DISCORD_WEBHOOK && failure() }}
run: |
git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
Expand Down Expand Up @@ -92,12 +92,12 @@ jobs:
run: ./build test+only --configuration=${{ matrix.configuration }}

- name: Send Discord Notification
if: failure()
env:
JOB_STATUS: ${{ job.status }}
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
if: ${{ env.DISCORD_WEBHOOK && failure() }}
run: |
git clone --depth 1 https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-west-2
if: ${{ env.DOCKERHUB_USERNAME && env.DOCKERHUB_PASSWORD && env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }}
run: |
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
./build docker-inflator
Expand All @@ -61,13 +62,15 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
SOURCE_DIR: _build/repack/Release
if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY }}

- name: Send Discord Notification
env:
JOB_STATUS: ${{ job.status }}
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
if: ${{ env.DISCORD_WEBHOOK }}
run: |
git clone --depth 1 https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
if: ${{ env.DISCORD_WEBHOOK }}]
run: |
git clone --depth 1 https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
3 changes: 2 additions & 1 deletion Tests/NetKAN/Sources/Spacedock/SpacedockApiTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Net;
using CKAN;
using CKAN.NetKAN.Services;
using CKAN.NetKAN.Sources.Spacedock;
Expand Down Expand Up @@ -72,7 +73,7 @@ public void ThrowsWhenModMissing()
TestDelegate act = () => sut.GetMod(-1);

// Assert
Assert.That(act, Throws.Exception.InstanceOf<Kraken>());
Assert.That(act, Throws.Exception.InstanceOf<WebException>());
}
}
}