Skip to content

Commit

Permalink
Update to depnd on the precise release
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Sep 24, 2024
1 parent c87491a commit c46ab45
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
BuildPublish:
runs-on: ubuntu-latest
outputs:
flakeref: ${{ steps.flakehubpush.outputs.flakeref }}
flakeref_exact: ${{ steps.flakehubpush.outputs.flakeref_exact }}
permissions:
id-token: "write"
contents: "read"
Expand All @@ -37,6 +37,7 @@ jobs:
rolling: true
visibility: "private"
include-output-paths: true
source-pr: 169

Deploy:
if: github.ref == 'refs/heads/main'
Expand All @@ -57,7 +58,7 @@ jobs:
--region us-east-2 \
--targets Key=tag:Name,Values=FlakeHubDemo \
--document-name "FlakeHub-ApplyNixOS" \
--parameters flakeref="${{ needs.BuildPublish.outputs.flakeref }}#nixosConfigurations.ethercalc-demo"
--parameters flakeref="${{ needs.BuildPublish.outputs.flakeref_exact }}#nixosConfigurations.ethercalc-demo"
- name: Breakpoint if tests failed
if: failure()
uses: namespacelabs/breakpoint-action@v0
Expand Down
12 changes: 11 additions & 1 deletion setup/deploy-from-github/deploy-automation.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,17 @@ resource "aws_ssm_document" "deploy" {
flakeref = {
type = "String"
description = "The FlakeHub flake reference. Example: DeterminateSystems/demo/0.1#nixosConfigurations.ethercalc-demo"
allowedPattern = "^[a-zA-Z0-9\\-_]+\\/[a-zA-Z0-9\\-_]+\\/[a-zA-Z0-9\\-_.]+#([a-zA-Z0-9\\-_]+\\.?)+$"
allowedPattern = join("", [
# Owner/Flake/
"^[a-zA-Z0-9\\-_]+\\/[a-zA-Z0-9\\-_]+",
# /
"\\/",
# Version specifier
"[a-zA-Z0-9\\-_.+=~*]+",
# literal #
"#",
# attribute path
"([a-zA-Z0-9\\-_]+\\.?)+$"])
}
}
mainSteps = [
Expand Down

0 comments on commit c46ab45

Please sign in to comment.