{"id":28905181,"url":"https://github.com/theforeman/actions","last_synced_at":"2025-08-04T09:32:39.975Z","repository":{"id":66403226,"uuid":"466569035","full_name":"theforeman/actions","owner":"theforeman","description":"Shared GitHub workflows for use in the Foreman project","archived":false,"fork":false,"pushed_at":"2025-06-16T13:51:36.000Z","size":70,"stargazers_count":4,"open_issues_count":7,"forks_count":8,"subscribers_count":2,"default_branch":"v0","last_synced_at":"2025-06-30T23:40:39.667Z","etag":null,"topics":["actions","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theforeman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-05T21:13:09.000Z","updated_at":"2025-06-16T13:31:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"80dbdf1d-ce39-44c7-984e-a1a8511f046b","html_url":"https://github.com/theforeman/actions","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/theforeman/actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theforeman%2Factions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theforeman%2Factions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theforeman%2Factions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theforeman%2Factions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theforeman","download_url":"https://codeload.github.com/theforeman/actions/tar.gz/refs/heads/v0","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theforeman%2Factions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268675515,"owners_count":24288285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","hacktoberfest"],"created_at":"2025-06-21T13:06:34.166Z","updated_at":"2025-08-04T09:32:39.959Z","avatar_url":"https://github.com/theforeman.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Foreman GitHub Actions\n\nThis repository contains [reusable workflows](https://docs.github.com/en/actions/learn-github-actions/reusing-workflows)\nto reduce duplication in actions in the Foreman project.\n\nAt this moment it's considered experimental.\n\n## Rubocop\n\nTo call Rubocop within your CI, use the following workflow:\n\n```yaml\nname: CI\n\non: pull_request\n\nconcurrency:\n  group: ${{ github.ref_name }}-${{ github.workflow }}\n  cancel-in-progress: true\n\njobs:\n  rubocop:\n    name: Rubocop\n    uses: theforeman/actions/.github/workflows/rubocop.yml@v0\n```\n\n## Foreman plugin Ruby tests\n\nTo run the Foreman tests once Rubocop has passed, use the following workflow:\n\n```yaml\nname: CI\n\non:\n  pull_request:\n  push:\n    branches:\n      - 'develop'\n      - '*-stable'\n\nconcurrency:\n  group: ${{ github.ref_name }}-${{ github.workflow }}\n  cancel-in-progress: true\n\njobs:\n  rubocop:\n    name: Rubocop\n    uses: theforeman/actions/.github/workflows/rubocop.yml@v0\n\n  test:\n    name: Ruby\n    needs: rubocop\n    uses: theforeman/actions/.github/workflows/foreman_plugin.yml@v0\n    with:\n      plugin: MY_PLUGIN\n```\n\nBy default, this will run with the Ruby/NodeJS combination that is configured in Foreman's `.github/matrix.json`.\nThe Foreman version is specified using `foreman_version`, which defaults to `develop`.\n\nTo test out pull request number 1234, you can use:\n\n```yaml\njobs:\n  test:\n    name: Ruby\n    uses: theforeman/actions/.github/workflows/foreman_plugin.yml@v0\n    with:\n      plugin: MY_PLUGIN\n      foreman_version: refs/pull/1234/head\n```\n\nYou can adjust this matrix by setting the `matrix_include` and `matrix_exclude` inputs to the workflow:\n\n```yaml\nname: CI\n\non:\n  pull_request:\n  push:\n    branches:\n      - 'develop'\n      - '*-stable'\n\njobs:\n  test:\n    name: Ruby\n    uses: theforeman/actions/.github/workflows/foreman_plugin.yml@v0\n    with:\n      plugin: MY_PLUGIN\n      matrix_include: '[{\"ruby\": \"3.0\", \"node\": \"20\"}]'\n      matrix_exclude: '[{\"ruby\": \"2.5\", \"node\": \"10\"}, {\"ruby\": \"2.5\", \"node\": \"12\"}]'\n```\n\nYou can run tests against multiple Foreman versions by using a matrix:\n\n```yaml\nname: CI\n\non:\n  pull_request:\n  push:\n    branches:\n      - 'develop'\n      - '*-stable'\n\nconcurrency:\n  group: ${{ github.ref_name }}-${{ github.workflow }}\n  cancel-in-progress: true\n\njobs:\n  test:\n    name: Ruby\n    strategy:\n      fail-fast: false\n      matrix:\n        foreman:\n          - 3.9-stable\n          - develop\n    uses: theforeman/actions/.github/workflows/foreman_plugin.yml@v0\n    with:\n      plugin: MY_PLUGIN\n      foreman_version: ${{ matrix.foreman }}\n```\n\nIf you need to set additional environment variables (e.g. to handle specific dependencies in your Gemfile), you can provide them via `environment_variables`:\n\n```yaml\nname: CI\n\non:\n  pull_request:\n  push:\n    branches:\n      - 'develop'\n      - '*-stable'\n\nconcurrency:\n  group: ${{ github.ref_name }}-${{ github.workflow }}\n  cancel-in-progress: true\n\njobs:\n  rubocop:\n    name: Rubocop\n    uses: theforeman/actions/.github/workflows/rubocop.yml@v0\n\n  test:\n    name: Ruby\n    needs: rubocop\n    uses: theforeman/actions/.github/workflows/foreman_plugin.yml@v0\n    with:\n      plugin: MY_PLUGIN\n      environment_variables: |\n        CUSTOM_ENV_VARIABLE_ONE=FOO\n        CUSTOM_ENV_VARIABLE_TWO=BAR\n```\n\n## Foreman plugin JavaScript/React tests\n\nTo run the Foreman plugin JavaScript/React tests, use the following workflow:\n\n```yaml\nname: JavaScript\n\non:\n  pull_request:\n  push:\n    branches:\n      - 'develop'\n      - '*-stable'\n\nconcurrency:\n  group: ${{ github.ref_name }}-${{ github.workflow }}\n  cancel-in-progress: true\n\njobs:\n  test:\n    name: JavaScript\n    uses: theforeman/actions/.github/workflows/foreman_plugin_js.yml@v0\n    with:\n      plugin: MY_PLUGIN\n```\n\nBy default, this will run with the NodeJS versions that is configured in Foreman's `.github/matrix.json`.\n\nYou can alter the behavior the same way as with the Ruby tests.\n\n## Smart Proxy plugin test\n\nSimilar to the Foreman plugin test, this is aimed at Smart Proxy plugins.\nConceptually it verifies certain Ruby versions are supported and using `test-gem.yml` to run the tests.\n\n```yaml\nname: CI\n\non: pull_request\n\nconcurrency:\n  group: ${{ github.ref_name }}-${{ github.workflow }}\n  cancel-in-progress: true\n\njobs:\n  test:\n    name: Tests\n    uses: theforeman/actions/.github/workflows/smart_proxy_plugin.yml@v0\n```\n\nIt's possible to provide `foreman_proxy_version` via a parameter, but your `Gemfile` needs to respect this:\n\n```ruby\ngem 'smart_proxy', github: 'theforeman/smart-proxy', branch: ENV.fetch('SMART_PROXY_BRANCH', 'develop')\n```\n\n## Gem test\n\nTo test a simple gem that only needs Ruby and bundler, use the following workflow:\n\n```yaml\nname: CI\n\non: pull_request\n\nconcurrency:\n  group: ${{ github.ref_name }}-${{ github.workflow }}\n  cancel-in-progress: true\n\njobs:\n  test:\n    name: Tests\n    uses: theforeman/actions/.github/workflows/test-gem.yml@v0\n```\n\nBy default it uses `bundle exec rake spec` but it's possible to override the command:\n\n```yaml\njobs:\n  test:\n    name: Tests\n    uses: theforeman/actions/.github/workflows/test-gem.yml@v0\n    with:\n      command: bundle exec rake test\n```\n\n## breaks-robottelo labeller\n\nA workflow that, on adding a `/label breaks-robottelo` comment to a PR, adds a label `breaks-robottelo` to that PR.\n\n```yaml\nname: Label a PR `breaks-robottelo` on appropriate comment\non:\n  issue_comment:\n    types: [created]\njobs:\n  breaks-robottelo:\n    uses: theforeman/actions/.github/workflows/breaks-robottelo.yml@v0\n    permissions:\n      pull-requests: write\n    with:\n      repo: ${{ github.repository }}\n      issue: ${{ github.event.issue.number }}\n    secrets:\n      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n\n## Gem release (DEPRECATED)\n\nThis action is deprecated in favour of using Trusted Publishing with [voxpupuli/ruby-release](https://github.com/voxpupuli/ruby-release).\n\nTo release a gem, use the following workflow\n\n```yaml\nname: Release\n\non:\n  push:\n    # Pattern matched against refs/tags\n    tags:\n      - '**'\n\njobs:\n  release:\n    name: Release gem\n    uses: theforeman/actions/.github/workflows/release-gem.yml@v0\n    with:\n      allowed_owner: MY_USERNAME\n    secrets:\n      api_key: ${{ secrets.RUBYGEM_API_KEY }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheforeman%2Factions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheforeman%2Factions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheforeman%2Factions/lists"}