https://github.com/teragrep/dfg_01
DNF-Repo For GitHub
https://github.com/teragrep/dfg_01
Last synced: 4 months ago
JSON representation
DNF-Repo For GitHub
- Host: GitHub
- URL: https://github.com/teragrep/dfg_01
- Owner: teragrep
- License: agpl-3.0
- Created: 2026-01-22T09:42:52.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-30T11:53:24.000Z (4 months ago)
- Last Synced: 2026-01-31T04:19:29.849Z (4 months ago)
- Size: 17.6 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= 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 https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys[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` https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsuses[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
[source,yaml]
----
- 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
[source,yaml]
----
- 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
----
== 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`
|`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. The value of `to_path` is appended to it.
|`https://raw.githubusercontent.com/${{ inputs.to_repository }}/refs/heads/${{ inputs.to_branch }}/${{ inputs.to_path }}`
|`repo_name`
|Sets the repository name.
|`teragrep-central-releases`
|===
== Contributing
You can involve yourself with our project by https://github.com/teragrep/dfg_01/issues/new/choose[opening an issue] or submitting a pull request.
Contribution requirements:
. *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.
. Security checks must pass
. Pull requests must align with the principles and http://www.extremeprogramming.org/values.html[values] of extreme programming.
. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).
Read more in our https://github.com/teragrep/teragrep/blob/main/contributing.adoc[Contributing Guideline].
=== Contributor License Agreement
Contributors must sign https://github.com/teragrep/teragrep/blob/main/cla.adoc[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.