Skip to content

Commit

Permalink
Fix ansible#3938: don't assume working_directory is github.workspace
Browse files Browse the repository at this point in the history
Setting `working_directory` for ansible-lint action would fail due to
hard-coded `.git`, introduced in commit 6f728e0, when fetching
`.config/requirements-lock.txt`, introduced in

This fix replaces `.git` with `${{ github.workspace }}/.git` to make
`working_directory` argument work again.
  • Loading branch information
ajfabbri committed Apr 9, 2024
1 parent 88c5bd7 commit dae9f9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ runs:
GH_ACTION_REF: ${{ github.action_ref || 'main' }}
working-directory: ${{ steps.inputs.outputs.working_directory }}
run: |
wget --output-document=.git/ansible-lint-requirements.txt https://raw.githubusercontent.com/ansible/ansible-lint/$GH_ACTION_REF/.config/requirements-lock.txt
wget --output-document=${{ github.workspace}}/.git/ansible-lint-requirements.txt https://raw.githubusercontent.com/ansible/ansible-lint/$GH_ACTION_REF/.config/requirements-lock.txt
- name: Set up Python
if: inputs.setup_python == 'true'
Expand Down

0 comments on commit dae9f9b

Please sign in to comment.