mirror of
https://github.com/NixOS/nix
synced 2025-07-08 11:03:54 +02:00
Merge pull request #51 from DeterminateSystems/graham/fh-634-spaghetti-deploy
Initial cut of propose-release / release workflows
This commit is contained in:
commit
90e355784c
2 changed files with 49 additions and 17 deletions
29
.github/workflows/propose-release.yml
vendored
Normal file
29
.github/workflows/propose-release.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
reference-id:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
version:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
propose-release:
|
||||||
|
uses: DeterminateSystems/propose-release/.github/workflows/workflow.yml@main
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
with:
|
||||||
|
update-flake: false
|
||||||
|
reference-id: ${{ inputs.reference-id }}
|
||||||
|
version: ${{ inputs.version }}
|
||||||
|
extra-commands-early: |
|
||||||
|
echo ${{ inputs.version }} > .version-determinate
|
||||||
|
git add .version-determinate
|
||||||
|
git commit -m "Set .version-determinate to ${{ inputs.version }}"
|
37
.github/workflows/publish.yml
vendored
37
.github/workflows/publish.yml
vendored
|
@ -1,20 +1,23 @@
|
||||||
name: Publish on FlakeHub
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
tags:
|
types:
|
||||||
- "v*.*.*"
|
- released
|
||||||
|
|
||||||
publish:
|
jobs:
|
||||||
runs-on: ubuntu-latest
|
publish:
|
||||||
permissions:
|
if: (!github.repository.fork && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')))
|
||||||
contents: read
|
environment: ${{ github.event_name == 'release' && 'production' || '' }}
|
||||||
id-token: write
|
runs-on: ubuntu-latest
|
||||||
steps:
|
permissions:
|
||||||
- uses: actions/checkout@v4
|
contents: read
|
||||||
- uses: DeterminateSystems/nix-installer-action@main
|
id-token: write
|
||||||
- uses: "DeterminateSystems/flakehub-push@main"
|
steps:
|
||||||
with:
|
- uses: actions/checkout@v4
|
||||||
visibility: "private"
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
name: "DeterminateSystems/nix-priv"
|
- uses: "DeterminateSystems/flakehub-push@main"
|
||||||
tag: "${{ github.ref_name }}"
|
with:
|
||||||
|
rolling: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
|
||||||
|
visibility: "private"
|
||||||
|
tag: "${{ github.ref_name }}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue