diff --git a/.github/actions/gh-cache/cache/action.yml b/.github/actions/gh-cache/cache/action.yml index 7577a39..c403530 100644 --- a/.github/actions/gh-cache/cache/action.yml +++ b/.github/actions/gh-cache/cache/action.yml @@ -28,11 +28,14 @@ runs: working-directory: ${{ github.action_path }} shell: bash run: | - mkdir -p /home/runner/work/_actions/current/.github/actions - rsync -a ../../../../.github/actions/ /home/runner/work/_actions/current/.github/actions/ - ls -ltra /home/runner/work/_actions/current/.github/actions + RUNNER_WORK_DIR="$(realpath "${GITHUB_WORKSPACE}/../..")" + ACTION_DIR="${RUNNER_WORK_DIR}/_actions/github/accessibility-scanner/current" + mkdir -p "${ACTION_DIR}/.github/actions" + if [ "$(realpath "../../../../.github/actions")" != "$(realpath "${ACTION_DIR}/.github/actions")" ]; then + cp -a "../../../../.github/actions/." "${ACTION_DIR}/.github/actions/" + fi - name: Restore cached value - uses: ./../../_actions/current/.github/actions/gh-cache/restore + uses: ./../../_actions/github/accessibility-scanner/current/.github/actions/gh-cache/restore with: path: ${{ inputs.key }} token: ${{ inputs.token }} @@ -48,7 +51,7 @@ runs: - if: ${{ inputs.value }} name: Save cached value - uses: ./../../_actions/current/.github/actions/gh-cache/save + uses: ./../../_actions/github/accessibility-scanner/current/.github/actions/gh-cache/save with: path: ${{ inputs.key }} token: ${{ inputs.token }} diff --git a/action.yml b/action.yml index 3c519bb..c4ee5bd 100644 --- a/action.yml +++ b/action.yml @@ -44,12 +44,15 @@ runs: working-directory: ${{ github.action_path }} shell: bash run: | - mkdir -p /home/runner/work/_actions/current/.github/actions - rsync -a .github/actions/ /home/runner/work/_actions/current/.github/actions/ - ls -ltra /home/runner/work/_actions/current/.github/actions + RUNNER_WORK_DIR="$(realpath "${GITHUB_WORKSPACE}/../..")" + ACTION_DIR="${RUNNER_WORK_DIR}/_actions/github/accessibility-scanner/current" + mkdir -p "${ACTION_DIR}/.github/actions" + if [ "$(realpath ".github/actions")" != "$(realpath "${ACTION_DIR}/.github/actions")" ]; then + cp -a ".github/actions/." "${ACTION_DIR}/.github/actions/" + fi - name: Restore cached results id: restore - uses: ./../../_actions/current/.github/actions/gh-cache/cache + uses: ./../../_actions/github/accessibility-scanner/current/.github/actions/gh-cache/cache with: key: ${{ inputs.cache_key }} token: ${{ inputs.token }} @@ -66,20 +69,20 @@ runs: - if: ${{ inputs.login_url && inputs.username && inputs.password && !inputs.auth_context }} name: Authenticate id: auth - uses: ./../../_actions/current/.github/actions/auth + uses: ./../../_actions/github/accessibility-scanner/current/.github/actions/auth with: login_url: ${{ inputs.login_url }} username: ${{ inputs.username }} password: ${{ inputs.password }} - name: Find id: find - uses: ./../../_actions/current/.github/actions/find + uses: ./../../_actions/github/accessibility-scanner/current/.github/actions/find with: urls: ${{ inputs.urls }} auth_context: ${{ inputs.auth_context || steps.auth.outputs.auth_context }} - name: File id: file - uses: ./../../_actions/current/.github/actions/file + uses: ./../../_actions/github/accessibility-scanner/current/.github/actions/file with: findings: ${{ steps.find.outputs.findings }} repository: ${{ inputs.repository }} @@ -96,7 +99,7 @@ runs: - if: ${{ inputs.skip_copilot_assignment != 'true' }} name: Fix id: fix - uses: ./../../_actions/current/.github/actions/fix + uses: ./../../_actions/github/accessibility-scanner/current/.github/actions/fix with: issues: ${{ steps.get_issues_from_filings.outputs.issues }} repository: ${{ inputs.repository }} @@ -126,7 +129,7 @@ runs: FILINGS: ${{ steps.file.outputs.filings }} FIXINGS: ${{ steps.fix.outputs.fixings }} - name: Save cached results - uses: ./../../_actions/current/.github/actions/gh-cache/cache + uses: ./../../_actions/github/accessibility-scanner/current/.github/actions/gh-cache/cache with: key: ${{ inputs.cache_key }} value: ${{ steps.results.outputs.results }}