From ae642475bc6675ee79b21d9b7ef3de00a53b6c0e Mon Sep 17 00:00:00 2001 From: Mark Bonicillo Date: Sat, 8 Jun 2024 12:59:16 -0700 Subject: [PATCH] Fix --- .github/workflows/ci.yml | 8 +++++--- .github/workflows/publish-to-dockerhub.yml | 9 +++++---- .github/workflows/publish-to-pypi.yml | 8 +++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bddc46be..01874239 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ on: triggeredBy: description: 'Name of team member who is manually triggering this workflow' required: true + default: '' defaults: run: @@ -28,10 +29,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - - run: | - echo "This workflow was triggered by: $TRIGGER_PERSON" + - if: ${{ inputs.triggeredBy != '' }} + run: | + echo "This workflow was triggered by: $TEAM_MEMBER" env: - TRIGGER_PERSON: ${{ github.event.inputs.triggeredBy }} + TEAM_MEMBER: ${{ inputs.triggeredBy }} - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." diff --git a/.github/workflows/publish-to-dockerhub.yml b/.github/workflows/publish-to-dockerhub.yml index a37f471b..bc3bd6b4 100644 --- a/.github/workflows/publish-to-dockerhub.yml +++ b/.github/workflows/publish-to-dockerhub.yml @@ -19,6 +19,7 @@ on: triggeredBy: description: 'Name of team member who is manually triggering this workflow' required: true + default: '' jobs: @@ -31,11 +32,11 @@ jobs: attestations: write id-token: write steps: - - run: | - echo "This workflow was triggered by: $TRIGGER_PERSON" + - if: ${{ inputs.triggeredBy != '' }} + run: | + echo "This workflow was triggered by: $TEAM_MEMBER" env: - TRIGGER_PERSON: ${{ github.event.inputs.triggeredBy }} - + TEAM_MEMBER: ${{ inputs.triggeredBy }} - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 4633b154..c87be78d 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -19,6 +19,7 @@ on: triggeredBy: description: 'Name of team member who is manually triggering this workflow' required: true + default: '' permissions: contents: read @@ -27,10 +28,11 @@ jobs: publish-to-pypi: runs-on: ubuntu-latest steps: - - run: | - echo "This workflow was triggered by: $TRIGGER_PERSON" + - if: ${{ inputs.triggeredBy != '' }} + run: | + echo "This workflow was triggered by: $TEAM_MEMBER" env: - TRIGGER_PERSON: ${{ github.event.inputs.triggeredBy }} + TEAM_MEMBER: ${{ inputs.triggeredBy }} - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."