[pre-commit.ci] pre-commit autoupdate #79
This file contains 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: CI | |
'on': | |
push: | |
pull_request: | |
jobs: | |
action: | |
runs-on: ubuntu-latest | |
name: Test Github Action | |
env: | |
gha_email: "41898282+github-actions[bot]@users.noreply.github.com" | |
adb_email: "147556122+ansible-documentation-bot[bot]@users.noreply.github.com" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run basic case with no options | |
uses: ./ | |
- name: "1. Create blank repo for testing" | |
run: | | |
set -x -euo pipefail | |
mkdir test | |
cd test | |
echo "*" > .gitignore | |
git init . | |
- name: "1. Check basic case with no options" | |
run: | | |
set -x -euo pipefail | |
[ "$(git config user.name)" = "github-actions" ] | |
[ "$(git config user.email)" = "${gha_email}" ] | |
cd test | |
[ "$(git config user.name)" != "Github Actions" ] | |
[ "$(git config user.email)" != "${gha_email}" ] | |
cd - | |
git config --unset user.name | |
git config --unset user.email | |
- name: "2. Run complex case with global" | |
uses: ./ | |
with: | |
global: true | |
bot: "ansible-documentation-bot" | |
name: "Ansible Documentation Bot" | |
- name: "2. Check complex case with global" | |
run: | | |
set -x -euo pipefail | |
for d in "." "test"; do | |
cd "${d}" | |
[ "$(git config user.name)" = "Ansible Documentation Bot" ] | |
[ "$(git config user.email)" = "${adb_email}" ] | |
done | |
git config --global --unset user.name | |
git config --global --unset user.email | |
- name: "3. Run complex case with working-directory" | |
uses: ./ | |
with: | |
working-directory: ./test | |
- name: "3. Check complex case with working-directory" | |
run: | | |
cd test | |
[ "$(git config user.name)" = "github-actions" ] | |
[ "$(git config user.email)" = "${gha_email}" ] |