Skip to content

teragrep/dfg_01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DFG_01 DNF-Repo For GitHub

A simple to use GitHub Action that updates a dnf-compatible repository from any .rpm files present in the working directory at the time of calling.

Features

  • Supports configurable max retries to avoid merge issues and infinite loops.

  • Creates a ready to use .repo file.

Requirements

You need to have a deploy key configured to the to_repository that has write permission and pass the private key with deploy_key.

Limitations

  • Supports deploying only to GitHub repositories.

  • The repository file’s checksum will not be included in the metadata filename.

Usage

Add a uses: teragrep/dfg_01@main step to your workflow.

Examples uses a secret called DEPLOY_KEY that contains the key. DO NOT hardcode the key at any point.

Minimum configuration with only required arguments
- name: Update from release
  uses: teragrep/dfg_01@main
  with:
    from_repository: teragrep/example-repository
    from_version: 1.0.0
    to_repository: teragrep/central-repository
    deploy_key: ${{ secrets.DEPLOY_KEY }}
    files: target/wanted-rpm-*.rpm
    gpg_public_key: "${{ secrets.RPM_SIGNING_PUBLIC_KEY }}"
Full configuration with optional arguments
- name: Update from release
  uses: teragrep/dfg_01@main
  with:
    from_repository: teragrep/example-repository
    from_version: 1.0.0
    to_repository: teragrep/central-repository
    deploy_key: ${{ secrets.DEPLOY_KEY }}
    files: target/wanted-rpm-*.rpm
    gpg_public_key: ${{ secrets.RPM_SIGNING_PUBLIC_KEY }}
    to_branch: arbitrary-git-branch
    to_path: arbitrary-base-path
    max_attempts: 1
    repo_baseurl: https://custom.repo.example.com/example-repo
    repo_name: custom-repo-example
    location_prefix: 'packages/'

Documentation

These are required arguments to be used in with: block.

Required input argument Description Example value

from_repository

The source GitHub repository for the release. In user/repository format.

teragrep/release-repo

from_version

The exact release version.

1.0.0

to_repository

The target GitHub repository where the repodata is deployed to. In user/repository format.

teragrep/dnf-repo

deploy_key

The private part of the deployment key to be used with pushing to the target repository.

${{ secrets.DEPLOY_KEY }}

files

The files that are used for making the repodata. Supports glob.

target/wanted-rpm-*.rpm

gpg_public_key

The public part of the GPG key the .rpm was signed with.

${{ secrets.RPM_SIGNING_PUBLIC_KEY }}

These are optional arguments to be used in with: block.

Optional input argument Description Default value

to_branch

The branch where repository files are commited to.

gh-pages

to_path

The path where repository files are commited to. No trailing slash required.

central/releases

max_attempts

How times should committing should be attempted.

5

repo_baseurl

The baseurl used in the .repo file. Note that it is evaluated to the default value if left empty, and that it can’t contain variables if explicitly set. No trailing slash required.

https://raw.githubusercontent.com/${{ inputs.to_repository }}/refs/heads/${{ inputs.to_branch }}/${{ inputs.to_path }}

repo_name

Sets the repository name.

teragrep-central-releases

location_prefix

Expert setting. Sets the location prefix. Note that it is evaluated to the default value if left empty, and that it can’t contain variables if explicitly set. Mostly useful only when using a repository manager that requires relative paths and an url rewriting proxy which redirects requests to the correct location.

https://github.com/${{ inputs.from_repository }}/releases/download/${{ inputs.from_version }}/

Contributing

You can involve yourself with our project by opening an issue or submitting a pull request.

Contribution requirements:

  1. All changes must be accompanied by a new or changed test. If you think testing is not required in your pull request, include a sufficient explanation as why you think so.

  2. Security checks must pass

  3. Pull requests must align with the principles and values of extreme programming.

  4. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).

Read more in our Contributing Guideline.

Contributor License Agreement

Contributors must sign Teragrep Contributor License Agreement before a pull request is accepted to organization’s repositories.

You need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep’s repositories.

About

DNF-Repo For GitHub

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors