Mirror nix-community/home-manager#release-24.11@2411 #3225
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Mirror a repo's latest commit to a specific branch to FlakeHub." | |
run-name: Mirror ${{ inputs.repo }}#${{ inputs.branch }}@${{ inputs.rolling_minor }} | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: "The branch to publish." | |
type: "string" | |
required: true | |
repo: | |
description: "The repo to publish, in the format of Owner/Repo." | |
type: "string" | |
required: true | |
rolling_minor: | |
description: "The minor version to publish under." | |
type: "number" | |
required: true | |
jobs: | |
flakehub-publish: | |
runs-on: "ubuntu-latest" | |
permissions: | |
id-token: "write" | |
contents: "read" | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: (Nixpkgs only) Validate Nixpkgs version is stable | |
if: ${{ inputs.repo == 'NixOS/nixpkgs' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
INPUT_RELEASE-BRANCH: ${{ inputs.branch }} | |
run: node "./dist/index.js" | |
- uses: "actions/checkout@v4" | |
with: | |
repository: ${{ inputs.repo }} | |
ref: ${{ inputs.branch }} | |
- uses: "DeterminateSystems/nix-installer-action@main" | |
- uses: "DeterminateSystems/magic-nix-cache-action@main" | |
- uses: "DeterminateSystems/flakehub-push@main" | |
with: | |
mirror: true | |
visibility: public | |
repository: ${{ inputs.repo }} | |
rolling: true | |
rolling-minor: ${{ fromJSON(inputs.rolling_minor) }} | |
log-directives: flakehub_push=trace | |
logger: pretty |