GithubHelp home page GithubHelp logo

nilashishc / ansible-content-actions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ansible/ansible-content-actions

0.0 0.0 0.0 300 KB

Combine GitHub Actions to create a streamlined workflow for testing Ansible collection repositories on GitHub.

License: Apache License 2.0

ansible-content-actions's Introduction

pre-commit

ansible-content-actions

Combine GitHub Actions to create a streamlined workflow for testing Ansible collection repositories on GitHub.

Usage

To use the action add the following step to your workflow file (e.g. ansible/ansible-content-actions/.github/workflows/sanity.yaml@main)

Filename: test.yaml

---
name: "CI"

concurrency:
  group: ${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

on:
  pull_request:
    branches: [main]
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *'

jobs:
  changelog:
    uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main
    if: github.event_name == 'pull_request'
  ansible-lint:
    uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
  sanity:
    uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
  unit-galaxy:
    uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main
  integration:
    uses: ansible/ansible-content-actions/.github/workflows/integration.yaml@main
  all_green:
    if: ${{ always() }}
    needs:
      - changelog
      - sanity
      - integration
      - unit-galaxy
      - ansible-lint
    runs-on: ubuntu-latest
    steps:
      - run: >-
          python -c "assert 'failure' not in
          set([
          '${{ needs.changelog.result }}',
          '${{ needs.integration.result }}',
          '${{ needs.sanity.result }}',
          '${{ needs.unit-galaxy.result }}'
          '${{ needs.ansible-lint.result }}'
          ])"

Scope

This combined GitHub Action covers the following action workflows:

  • Ansible-lint - Checks playbooks for practices and behavior that could potentially be improved.
  • Sanity - Uses tox-ansible generates a testing matrix and runs sanity checks.
  • Unit - Installs the collection and all its dependencies from Galaxy and runs unit tests against a matrix generated via tox-ansible.
  • Integration - Installs the collection and all its dependencies from Galaxy and runs integration tests against a matrix generated via tox-ansible.
  • Changelog - Checks for a changelog entry with the PR, fails if missing or invalid.
  • Release - Push release to Automation Hub and Ansible Galaxy, requires (token/secrets).
  • Release Galaxy - Push a release to Ansible Galaxy only.
  • Release Automation Hub - Push a release to Ansible Automation Hub only.
  • Draft Release - Generates changelog entries for release, also raises a PR with changelog and galaxy file updated.
  • Check Label - Check if a valid label added to the PR is required by the release drafter.

Licensing

ansible-content-actions is released under the Apache License version 2.

See the LICENSE file for more details.

ansible-content-actions's People

Contributors

kb-perbyte avatar nilashishc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.