build(deps): bump step-security/harden-runner from 2.13.1 to 2.13.2 #369
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: lint | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 4 | |
| env: | |
| ANSIBLE_CALLBACKS_ENABLED: profile_tasks | |
| ANSIBLE_EXTRA_VARS: "-e harden_sshd_remote_src=yes -e harden_testing_privesc_upc=false -e harden_testing_privesc_lpc=false" | |
| ANSIBLE_ROLE: juju4.harden | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag=v5.0.0 | |
| with: | |
| path: ${{ env.ANSIBLE_ROLE }} | |
| - name: Set up Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # tag=v6.0.0 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip3 install ansible-lint flake8 yamllint | |
| which ansible | |
| pip3 install ansible | |
| pip3 show ansible | |
| ls -l $HOME/.local/bin || true | |
| ls -l /opt/hostedtoolcache/Python/3.9.1/x64/bin || true | |
| echo "/opt/hostedtoolcache/Python/3.9.1/x64/bin" >> $GITHUB_PATH | |
| ansible --version | |
| cd $GITHUB_WORKSPACE/$ANSIBLE_ROLE | |
| [ -f molecule/default/requirements.yml ] && ansible-galaxy install -r molecule/default/requirements.yml | |
| [ -f get-dependencies.sh ] && sh -x get-dependencies.sh | |
| { echo '[defaults]'; echo 'callbacks_enabled = profile_tasks, timer'; echo 'roles_path = ../'; echo 'ansible_python_interpreter: /usr/bin/python3'; } >> ansible.cfg | |
| - name: Fetch central settings repository | |
| run: | | |
| export settings_repo="https://raw.githubusercontent.com/juju4/ansible-ci-settings/main" | |
| cd $GITHUB_WORKSPACE/$ANSIBLE_ROLE | |
| set -x | |
| curl -o requirements.txt "$settings_repo/requirements.txt" | |
| # curl -o .ansible-lint "$settings_repo/.ansible-lint" | |
| curl -o .yamllint "$settings_repo/.yamllint" | |
| pip install -r requirements.txt | |
| continue-on-error: true | |
| - name: Environment | |
| run: | | |
| pwd | |
| env | |
| find . -ls | |
| - uses: codespell-project/actions-codespell@master | |
| with: | |
| ignore_words_file: ${{ env.ANSIBLE_ROLE }}/.codespellignore | |
| skip: .git | |
| path: ${{ env.ANSIBLE_ROLE }} | |
| if: ${{ always() }} | |
| - name: yamllint | |
| run: | | |
| cd $GITHUB_WORKSPACE/$ANSIBLE_ROLE && yamllint . | |
| if: ${{ always() }} | |
| - name: ansible-lint | |
| run: | | |
| cd $GITHUB_WORKSPACE/$ANSIBLE_ROLE && ansible-lint | |
| if: ${{ always() }} |