diff --git a/.github/workflows/set-environment.yml b/.github/workflows/action-approval.yml similarity index 68% rename from .github/workflows/set-environment.yml rename to .github/workflows/action-approval.yml index 17b70f049a..0bc30c96d1 100644 --- a/.github/workflows/set-environment.yml +++ b/.github/workflows/action-approval.yml @@ -2,9 +2,10 @@ on: workflow_call: jobs: - set-environment: + action-approval: + name: 'Action approval' # github.event_name == 'pull_request_target' && environment: ${{ github.event.pull_request.head.repo.full_name != github.repository && 'not-pr-from-fork' || 'pr-from-fork' }} runs-on: ubuntu-latest steps: - - run: echo "Environment set" + - run: echo "Environment set, waiting for approval if required" diff --git a/.github/workflows/test-set-environment.yml b/.github/workflows/test-set-environment.yml index 2ba9b21d7a..b926786adf 100644 --- a/.github/workflows/test-set-environment.yml +++ b/.github/workflows/test-set-environment.yml @@ -1,13 +1,13 @@ -name: 'Test set-environment' +name: 'My Workflow' on: pull_request: jobs: - set-environment: - uses: ./.github/workflows/set-environment.yml - some-job: - needs: set-environment + action-approval: + uses: ./.github/workflows/action-approval.yml + my-job: + needs: action-approval runs-on: ubuntu-latest steps: - - run: echo "blah" \ No newline at end of file + - run: echo "My job ran" \ No newline at end of file