File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,14 +23,20 @@ jobs:
2323 create_args : " "
2424 steps :
2525 - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
26+ with :
27+ persist-credentials : false
2628
2729 - name : Set up Go
2830 uses : actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16
2931 with :
3032 go-version : " 1.26.x"
3133
3234 - name : Install sitectl
33- uses : libops/.github/.github/actions/install-sitectl@da242aa070fa29b4028c5e03884b69857ea13fdf # main
35+ uses : libops/.github/.github/actions/install-sitectl@90a9272d0829c878a682ba636bc155c2b06c7939 # main
36+ with :
37+ packages : sitectl
38+ package-versions : sitectl=0.40.0
39+ allow-unversioned : false
3440
3541 - name : setup git identity
3642 run : |
Original file line number Diff line number Diff line change 11version : 2
22before :
33 hooks :
4- - ./scripts/check-sitectl-core-version.sh v0.38 .0
4+ - ./scripts/check-sitectl-core-version.sh v0.40 .0
55 - go mod tidy
66builds :
77 - binary : sitectl-drupal
@@ -72,10 +72,10 @@ nfpms:
7272 overrides :
7373 deb :
7474 dependencies :
75- - sitectl (>= 0.38 .0)
75+ - sitectl (>= 0.40 .0)
7676 rpm :
7777 dependencies :
78- - sitectl >= 0.38 .0
78+ - sitectl >= 0.40 .0
7979 apk :
8080 dependencies :
81- - sitectl>=0.38 .0
81+ - sitectl>=0.40 .0
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import "github.com/libops/sitectl/pkg/plugin"
44
55const (
66 drupalCreateRepo = "https://github.com/libops/drupal"
7- drupalCreateBranch = "main "
7+ drupalCreateBranch = "v1.0.0 "
88 drupalCreateDrupalRoot = "."
99 drupalContainerRoot = "/var/www/drupal"
1010)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/libops/sitectl-drupal
33go 1.26.1
44
55require (
6- github.com/libops/sitectl v0.38 .0
6+ github.com/libops/sitectl v0.40 .0
77 github.com/spf13/cobra v1.10.2
88 gopkg.in/yaml.v3 v3.0.1
99)
Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
8282github.com/kr/text v0.2.0 /go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE =
8383github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc =
8484github.com/kylelemons/godebug v1.1.0 /go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw =
85- github.com/libops/sitectl v0.38 .0 h1:QyaquU/+E3OS2yEQQnGi/dkCPpT+jGYYLJulPOSfqnE =
86- github.com/libops/sitectl v0.38 .0 /go.mod h1:+MB7d95kz2/MbNSRB2gTlSwDg6swsFjh4zI5gC6rb+k =
85+ github.com/libops/sitectl v0.40 .0 h1:LmlaqnCybdaT391nTe8tQvH4NYKDLdCcbNNjYluntv4 =
86+ github.com/libops/sitectl v0.40 .0 /go.mod h1:+MB7d95kz2/MbNSRB2gTlSwDg6swsFjh4zI5gC6rb+k =
8787github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4 =
8888github.com/lucasb-eyer/go-colorful v1.4.0 /go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0 =
8989github.com/mattn/go-runewidth v0.0.24 h1:cpokDiIn0MGnhdHwuWnJBITySJ20QyNGnY2kR/ay2DU =
Original file line number Diff line number Diff line change 11#! /bin/sh
22set -eu
33
4- minimum=" ${1:- v0.38 .0} "
4+ minimum=" ${1:- v0.40 .0} "
55version=" $( GOWORK=off go list -m -f ' {{.Version}}' github.com/libops/sitectl) "
66
77case " $version " in
Original file line number Diff line number Diff line change @@ -48,6 +48,21 @@ build_plugin() {
4848 command -v " ${PLUGIN_BINARY} " > /dev/null
4949}
5050
51+ assert_template_lock () {
52+ local lock=" ${SITE_DIR} /.libops/template.lock.yaml"
53+ if [ -L " ${lock} " ] || [ ! -f " ${lock} " ]; then
54+ echo " sitectl create did not retain a regular template provenance lock" >&2
55+ return 1
56+ fi
57+ test " $( stat -c ' %a' " ${lock} " ) " = " 644"
58+ grep -Fxq ' apiVersion: sitectl.libops.io/v1alpha1' " ${lock} "
59+ grep -Fxq ' kind: TemplateLock' " ${lock} "
60+ grep -Eq ' ^ commit: [0-9a-f]{40}([0-9a-f]{24})?$' " ${lock} "
61+ grep -Fxq " repository: https://github.com/libops/${PLUGIN_NAME} " " ${lock} "
62+ grep -Eq ' ^ digest: sha256:[0-9a-f]{64}$' " ${lock} "
63+ grep -Fxq ' revision: v1.0.0' " ${lock} "
64+ }
65+
5166create_site () {
5267 local target=" ${PLUGIN_NAME} /${CREATE_DEFINITION} "
5368 local extra_args=()
@@ -61,6 +76,7 @@ create_site() {
6176 --checkout-source template \
6277 --default-context \
6378 " ${extra_args[@]} "
79+ assert_template_lock
6480}
6581
6682run_healthcheck () {
You can’t perform that action at this time.
0 commit comments