Skip to content

Commit

Permalink
Migrate standalone role to a collection
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Ziegner <[email protected]>
  • Loading branch information
Norman Ziegner committed Mar 14, 2024
1 parent 6560514 commit a6ddaf3
Show file tree
Hide file tree
Showing 30 changed files with 661 additions and 536 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: "Ansible Lint"
on:
pull_request:
paths:
- 'roles/**'
push:
branches:
- "main"
tags:
- "v*.*.*"
paths:
- 'roles/**'

env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1

jobs:

ansible-lint:
name: "Ansible Lint"
runs-on: "ubuntu-22.04"
steps:
- name: "Check out the codebase."
uses: "actions/checkout@v4"

- name: "Lint code."
uses: "ansible/[email protected]"
1 change: 1 addition & 0 deletions .github/workflows/prepare-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ runs:
- name: "Install dependencies via pipenv."
run: "pipenv install --dev"
shell: "bash"
working-directory: "ansible_collections/hifis/software_services"
Original file line number Diff line number Diff line change
@@ -1,39 +1,29 @@
---
name: "CI"
name: "hifis.unattended_upgrades"
on:
pull_request:
push:
branches:
- "main"
tags:
- "v*.*.*"
paths:
- '.github/workflows/unattended_upgrades.yml'
- 'roles/unattended_upgrades/**'
- 'molecule/unattended_upgrades/**'
- 'Pipfile'
- 'Pipfile.lock'
schedule:
- cron: '0 0 * * *'

env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1

jobs:

lint:
name: "Lint"
runs-on: "ubuntu-22.04"
steps:
- name: "Check out the codebase."
uses: "actions/checkout@v4"

- name: "Prepare the job environment."
uses: "./.github/workflows/prepare-action"

- name: "Lint code."
run: |
pipenv run yamllint --strict --format colored .
pipenv run ansible-lint -v --force-color --offline
test:
name: "Run Molecule tests."
runs-on: "ubuntu-22.04"
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
strategy:
fail-fast: false
matrix:
Expand All @@ -47,9 +37,11 @@ jobs:
steps:
- name: "Check out the codebase."
uses: "actions/checkout@v4"
with:
path: "ansible_collections/hifis/software_services"

- name: "Prepare the job environment."
uses: "./.github/workflows/prepare-action"
uses: ".github/workflows/prepare-action"

- name: "Install modern podman"
run: |
Expand All @@ -68,17 +60,18 @@ jobs:
run: "pipenv run molecule test"
env:
MOLECULE_IMAGE: "${{ matrix.image }}"
working-directory: "ansible_collections/hifis/software_services"

release:
name: "Release new version on Ansible Galaxy"
runs-on: "ubuntu-22.04"
if: "startsWith(github.ref, 'refs/tags/v')"
needs: ["lint", "test"]
steps:
- name: "checkout"
uses: "actions/checkout@v4"
- name: "galaxy"
uses: "robertdebock/[email protected]"
with:
galaxy_api_key: "${{ secrets.galaxy_api_key }}"
git_branch: "main"
# release:
# name: "Release new version on Ansible Galaxy"
# runs-on: "ubuntu-22.04"
# if: "startsWith(github.ref, 'refs/tags/v')"
# needs: ["lint", "test"]
# steps:
# - name: "checkout"
# uses: "actions/checkout@v4"
# - name: "galaxy"
# uses: "robertdebock/[email protected]"
# with:
# galaxy_api_key: "${{ secrets.galaxy_api_key }}"
# git_branch: "main"
2 changes: 1 addition & 1 deletion .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
user=hifis-net
project=ansible-role-unattended-upgrades
since-tag=v1.12.2
since-tag=v3.3.0
234 changes: 0 additions & 234 deletions CHANGELOG.md

Large diffs are not rendered by default.

Loading

0 comments on commit a6ddaf3

Please sign in to comment.