diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 46b345b911..fd75ae4942 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,12 +92,12 @@ jobs: run: ./build test+only --configuration=${{ matrix.configuration }} - name: Send Discord Notification - if: ${{ secrets.DISCORD_WEBHOOK && 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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 745c2e9a37..b6e0cc9921 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,18 +41,17 @@ jobs: run: xvfb-run ./build test+only --configuration=Release --where="Category!=FlakyNetwork" - name: Generate Docker image and publish to Hub - if: ${{ secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_PASSWORD && secrets.AWS_ACCESS_KEY_ID && secrets.AWS_SECRET_ACCESS_KEY }} env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} 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 - name: Push to S3 - if: ${{ secrets.AWS_ACCESS_KEY_ID && secrets.AWS_SECRET_ACCESS_KEY }} # Send ckan.exe and netkan.exe to https://ksp-ckan.s3-us-west-2.amazonaws.com/ uses: jakejarvis/s3-sync-action@master with: @@ -63,14 +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 - if: ${{ secrets.DISCORD_WEBHOOK }} 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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd6f2c68d3..23dc00eccd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,12 +88,12 @@ jobs: asset_content_type: application/vnd.microsoft.portable-executable - name: Send Discord Notification - if: ${{ secrets.DISCORD_WEBHOOK }} 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