From eef817c2233eb3ea02b1fdadd63509a08869c39e Mon Sep 17 00:00:00 2001 From: Will Scullin Date: Mon, 6 Jan 2025 13:21:37 -0800 Subject: [PATCH] Fix action structure --- .github/actions/permission-check/action.yaml | 36 +++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/actions/permission-check/action.yaml b/.github/actions/permission-check/action.yaml index 41ab7d8..d7f8391 100644 --- a/.github/actions/permission-check/action.yaml +++ b/.github/actions/permission-check/action.yaml @@ -1,16 +1,20 @@ -steps: - - name: Get User Permission - id: checkAccess - uses: actions-cool/check-user-permission@v2 - with: - require: write - username: ${{ github.triggering_actor }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Check User Permission - if: steps.checkAccess.outputs.require-result == 'false' - run: | - echo "${{ github.triggering_actor }} does not have permissions on this repo." - echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}" - echo "Job originally triggered by ${{ github.actor }}" - exit 1 +name: 'Get and Check Permissions' +description: 'Get and check user permissions for secret access' +runs: + using: 'composite' + steps: + - name: Get User Permission + id: checkAccess + uses: actions-cool/check-user-permission@v2 + with: + require: write + username: ${{ github.triggering_actor }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Check User Permission + if: steps.checkAccess.outputs.require-result == 'false' + run: | + echo "${{ github.triggering_actor }} does not have permissions on this repo." + echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}" + echo "Job originally triggered by ${{ github.actor }}" + exit 1