From 09d07c73b4d9771f527a168e0b1b6d8a1f39de28 Mon Sep 17 00:00:00 2001 From: Gabriele Modena Date: Sat, 24 Feb 2024 14:39:24 +0100 Subject: [PATCH] worfklows: add flakehub integration. (#50) Add an integration workflow with flakehub. Change nix installer Github Action to DeterminateSystems. --- .github/workflows/flakehub-publish-tagged.yml | 28 +++++++++++++++++++ .github/workflows/test.yml | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/flakehub-publish-tagged.yml diff --git a/.github/workflows/flakehub-publish-tagged.yml b/.github/workflows/flakehub-publish-tagged.yml new file mode 100644 index 0000000..b5dc4fa --- /dev/null +++ b/.github/workflows/flakehub-publish-tagged.yml @@ -0,0 +1,28 @@ +name: "Publish tags to FlakeHub" +on: + push: + tags: + - "v?[0-9]+.[0-9]+.[0-9]+*" + workflow_dispatch: + inputs: + tag: + description: "The existing tag to publish to FlakeHub" + type: "string" + required: true +jobs: + flakehub-publish: + runs-on: "ubuntu-latest" + permissions: + id-token: "write" + contents: "read" + steps: + - uses: "actions/checkout@v3" + with: + ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}" + - uses: "DeterminateSystems/nix-installer-action@main" + - uses: "DeterminateSystems/flakehub-push@main" + with: + visibility: "public" + name: "gmodena/nix-flatpak" + tag: "${{ inputs.tag }}" + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d3b797e..885a303 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: continue-on-error: true steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v18 + - uses: DeterminateSystems/nix-installer-action@v4 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - run: nix flake check