dependabot[bot] 81d0380e46
build(deps): bump actions/checkout from 4 to 5 (#117)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 18:00:48 +02:00

111 lines
3.3 KiB
YAML

name: Test Action
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
remote:
runs-on: ubuntu-latest
env:
SSH_PRIVATE_KEY: |-
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACDOZViU5W+blYnk79GYr7IdVOfXRl69cgwmyM3s3jghdgAAAJCwXk9osF5P
aAAAAAtzc2gtZWQyNTUxOQAAACDOZViU5W+blYnk79GYr7IdVOfXRl69cgwmyM3s3jghdg
AAAEBJXcxT+1llev7YeIFbFLGAO4qv3IMauUfF211JU/uVp85lWJTlb5uVieTv0Zivsh1U
59dGXr1yDCbIzezeOCF2AAAABm5vbmFtZQECAwQFBgc=
-----END OPENSSH PRIVATE KEY-----
SSH_PUBLIC_KEY: |-
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM5lWJTlb5uVieTv0Zivsh1U59dGXr1yDCbIzezeOCF2 noname
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup remote
run: |
mkdir "$HOME/.ssh"
echo "$SSH_PUBLIC_KEY" | tee "$HOME/.ssh/authorized_keys"
chmod 600 "$HOME/.ssh/authorized_keys"
echo 'SSH_KNOWN_HOSTS<<EOF' >> $GITHUB_ENV
echo $(ssh-keyscan localhost 2>/dev/null) >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: With everything
uses: ./
with:
playbook: playbook.yml
key: ${{env.SSH_PRIVATE_KEY}}
known_hosts: ${{env.SSH_KNOWN_HOSTS}}
directory: test
configuration: |
[defaults]
callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer
stdout_callback = yaml
nocows = false
vault_password: test
requirements: requirements.yml
inventory: |
[all]
localhost
options: |
-vv
-e docker_image=docker_url
-e docker_username=user
-e docker_password=pass
-e db_name=db_name
-e db_user=db_user
-e db_pass=db_pass
local:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: With check mode
uses: ./
with:
playbook: playbook.yml
directory: test
check_mode: true
options: --inventory hosts
- name: With custom ansible.cfg
uses: ./
with:
playbook: playbook.yml
directory: test
configuration: |
[defaults]
callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer
stdout_callback = yaml
nocows = false
options: --inventory hosts
- name: With requirements
uses: ./
with:
playbook: playbook.yml
directory: test
requirements: requirements.yml
options: --inventory hosts
- name: With requirements bundle
uses: ./
with:
playbook: playbook.yml
directory: test
requirements: requirements-bundle.yml
options: --inventory hosts
- name: With vault password
uses: ./
with:
playbook: playbook.yml
directory: test
vault_password: test
options: --inventory hosts
- name: With sudo
uses: ./
with:
playbook: playbook.yml
directory: test
sudo: true
options: --inventory hosts