Skip to content

Commit

Permalink
Add a github action to publish to flakehub
Browse files Browse the repository at this point in the history
Will be removed once I can do this without github
(DeterminateSystems/flakehub-push#79)
  • Loading branch information
kip93 committed Sep 23, 2023
1 parent 419b96c commit 652c255
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/flakehub-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# TODO remove (https://github.com/DeterminateSystems/flakehub-push/issues/79)
name: "Publish flake to FlakeHub"
on: { push: { branches: [ "main" ] } }
jobs:
flakehub-publish:
runs-on: "ubuntu-latest"
permissions: { id-token: "write", contents: "read" }
steps:
- uses: "actions/checkout@v3"
- uses: "DeterminateSystems/nix-installer-action@main"
- id: version
run: |
set -eu
timestamp=${{ github.event.commits[0].timestamp }}
minor="$(date -d "$timestamp" +%Y%m%d)"
printf 'minor=%s\n' "$minor" >>"$GITHUB_OUTPUT"
- uses: "DeterminateSystems/flakehub-push@main"
with:
name: "kip93/npp"
visibility: "public"
rolling: true
rolling-minor: ${{ steps.version.outputs.minor }}

0 comments on commit 652c255

Please sign in to comment.