Skip to content

Commit

Permalink
Merge pull request #16 from id-unibe-ch/15-add-release-announcement-w…
Browse files Browse the repository at this point in the history
…orkflow

Add release announcement workflows
  • Loading branch information
mrolli authored Jul 1, 2024
2 parents 7cf26ee + ffd9476 commit 29a01f5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 33 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
---
name: CI
"on":
on:
pull_request:
push:
branches:
- main

jobs:

lint:
name: Lint
runs-on: ubuntu-latest

steps:

- name: Checkout the codebase
uses: actions/checkout@v3

- name: Setup Python 3
uses: actions/setup-python@v3
with:
python-version: "3.x"
python-version: '3.x'

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

- name: Lint code.
run: |
Expand All @@ -32,17 +34,13 @@ jobs:
molecule:
name: Molecule
runs-on: ubuntu-latest
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy
strategy:
matrix:
distro: [rockylinux8, rockylinux9, ubuntu2004, ubuntu2204]
scenario: [default]
include:
- distro: rockylinux8
playbook: converge.yml
- distro: rockylinux9
playbook: converge.yml
- distro: ubuntu2004
playbook: converge.yml
- distro: ubuntu2204
playbook: converge.yml
- playbook: converge.yml

steps:
- name: Checkout the codebase
Expand All @@ -51,15 +49,15 @@ jobs:
- name: Setup Python 3
uses: actions/setup-python@v3
with:
python-version: "3.x"
python-version: '3.x'

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

- name: Run Molecule tests.
run: molecule test
run: molecule test -s ${{ matrix.scenario }}
env:
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}
MOLECULE_PLAYBOOK: ${{ matrix.playbook }}
25 changes: 25 additions & 0 deletions .github/workflows/release_announcement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Release announcement
on:
release:
types: [published]

jobs:
notify:
name: Notify new release
runs-on: ubuntu-latest
if: github.event.release.name != ''

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Notify dedicated teams channel
uses: simbo/[email protected]
with:
webhook: ${{ secrets.TEAMS_SYS_WEBHOOK_ANSIBLE_TALK_URI }}
title: "New Release for ${{ github.repository }}"
message: "Release ${{ github.event.release.name }} for repository ${{ github.repository }} has just been published!"
color: "ff6e00"
buttons: |
Open release notes at GitHub https://github.com/${{ github.repository }}/releases/tag/${{ github.event.release.name }}
19 changes: 2 additions & 17 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,16 @@ role_name_check: 1
dependency:
name: galaxy
driver:
name: docker
name: podman
platforms:
- name: instance
- name: ${MOLECULE_DISTRO:-rockylinux9}
image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux9}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
pre_build_image: true
networks:
- name: snowagent_molecule_default

- name: download
image: "geerlingguy/docker-rockylinux9-ansible:latest"
command: ""
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
pre_build_image: true
networks:
- name: snowagent_molecule_default
exposed_ports:
- 80
provisioner:
name: ansible
playbooks:
Expand Down

0 comments on commit 29a01f5

Please sign in to comment.