Skip to content

Commit

Permalink
add roles to path
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksanderbl29 committed May 3, 2024
1 parent 6276e5c commit 45412a7
Show file tree
Hide file tree
Showing 51 changed files with 3,344 additions and 0 deletions.
8 changes: 8 additions & 0 deletions roles/aleksanderbl29.hyperhdr/.ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
skip_list:
- no-changed-when
- risky-shell-pipe
- no-relative-paths

exclude_paths:
- tasks/gtp.yml
77 changes: 77 additions & 0 deletions roles/aleksanderbl29.hyperhdr/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
name: CI
'on':
pull_request:
push:
branches:
- main
schedule:
- cron: "30 2 * * 1"

defaults:
run:
working-directory: 'aleksanderbl29.hyperhdr'

jobs:

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'aleksanderbl29.hyperhdr'

- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install yamllint ansible-lint

- name: Yamllint code.
run: |
yamllint .
- name: Ansible lint code.
run: |
ansible-lint .
molecule:
name: Molecule
runs-on: ubuntu-latest
strategy:
matrix:
distro:
# - ubuntu2004
- ubuntu2204
- ubuntu2404
- debian12
- debian11
# - debian10

steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'aleksanderbl29.hyperhdr'

- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install ansible molecule molecule-plugins[docker] docker

# - name: Install role dependencies.
# run: ansible-galaxy role install -r requirements.yml

- name: Run Molecule tests.
run: molecule test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}
40 changes: 40 additions & 0 deletions roles/aleksanderbl29.hyperhdr/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
# repository or organization.
#
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
# See: https://github.com/ansible/galaxy/issues/46

name: Release
'on':
push:
tags:
- '*'

defaults:
run:
working-directory: 'aleksanderbl29.hyperhdr'

jobs:

release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: 'aleksanderbl29.hyperhdr'

- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install Ansible.
run: pip3 install ansible-core

- name: Trigger a new import on Galaxy.
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
34 changes: 34 additions & 0 deletions roles/aleksanderbl29.hyperhdr/.github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Close inactive issues
'on':
schedule:
- cron: "55 19 * * 0" # semi-random time

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
days-before-stale: 120
days-before-close: 60
exempt-issue-labels: bug,pinned,security,planned
exempt-pr-labels: bug,pinned,security,planned
stale-issue-label: "stale"
stale-pr-label: "stale"
stale-issue-message: |
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale.
close-issue-message: |
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
stale-pr-message: |
This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale.
close-pr-message: |
This pr has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
repo-token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 45412a7

Please sign in to comment.