Only run workflows if they might be able to work (#63164)

This commit is contained in:
Josh Soref
2023-07-28 05:01:14 -04:00
committed by GitHub
parent e6fe34c62c
commit 234b5c8c21
21 changed files with 185 additions and 16 deletions
+15
View File
@@ -8,7 +8,22 @@ on:
concurrency:
group: pr-commands-${{ github.event.number }}
jobs:
config:
runs-on: "ubuntu-latest"
outputs:
has-secrets: ${{ steps.check.outputs.has-secrets }}
steps:
- name: "Check for secrets"
id: check
shell: bash
run: |
if [ -n "${{ (secrets.GRAFANA_MISC_STATS_API_KEY != '' && secrets.GH_BOT_ACCESS_TOKEN != '') || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
fi
main:
needs: config
if: needs.config.outputs.has-secrets
runs-on: ubuntu-latest
steps:
- name: Checkout Actions