Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Use Ubuntu 24.04 in GitHub Actions #1419

Use Ubuntu 24.04 in GitHub Actions

Use Ubuntu 24.04 in GitHub Actions #1419

Workflow file for this run

# SPDX-FileCopyrightText: 2022 Helmholtz Centre for Environmental Research (UFZ)
# SPDX-FileCopyrightText: 2022 Helmholtz-Zentrum Dresden-Rossendorf (HZDR)
#
# SPDX-License-Identifier: Apache-2.0
---
name: CI
on:
pull_request:
push:
branches:
- "main"
tags:
- "v*.*.*"
schedule:
- cron: "0 0 * * *"
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
jobs:
lint:
name: Lint
runs-on: ubuntu-24.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: |
poetry run yamllint --strict --format colored .
poetry run ansible-lint -v --force-color --exclude=.cache/ . ./molecule
license_compliance:
name: Check license compliance with reuse.
runs-on: ubuntu-24.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: poetry run reuse lint
test:
name: Run Molecule tests.
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
image:
- "ghcr.io/hifis-net/ubuntu-systemd:20.04"
- "ghcr.io/hifis-net/ubuntu-systemd:22.04"
- "ghcr.io/hifis-net/ubuntu-systemd:24.04"
- "ghcr.io/hifis-net/debian-systemd:10"
- "ghcr.io/hifis-net/debian-systemd:11"
- "ghcr.io/hifis-net/debian-systemd:12"
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
- name: Prepare the job environment.
uses: ./.github/workflows/prepare-action
- name: Run Molecule tests.
run: XDG_RUNTIME_DIR=/run/user/$UID poetry run molecule test
env:
MOLECULE_IMAGE: ${{ matrix.image }}
AUTHENTICATION_TOKEN: ${{ secrets.authentication_token }}
release:
name: Release new version on Ansible Galaxy
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
needs: [lint, license_compliance, 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"